diff --git a/cocos2dx/platform/ios/AccelerometerDelegateWrapper.mm b/cocos2dx/platform/ios/AccelerometerDelegateWrapper.mm index 4ad4f33269..322693aaf2 100644 --- a/cocos2dx/platform/ios/AccelerometerDelegateWrapper.mm +++ b/cocos2dx/platform/ios/AccelerometerDelegateWrapper.mm @@ -34,7 +34,7 @@ static AccelerometerDispatcher* s_pAccelerometerDispatcher; + (id) sharedAccelerometerDispather { if (s_pAccelerometerDispatcher == nil) { - s_pAccelerometerDispatcher = [self alloc]; + s_pAccelerometerDispatcher = [[self alloc] init]; } return s_pAccelerometerDispatcher;