mirror of https://github.com/axmolengine/axmol.git
Silenced LLVM SA Warning/Error regarding static singleton pattern. Added dealloc method.
This commit is contained in:
parent
81d8dd0eb2
commit
e3094d80d0
|
@ -67,6 +67,14 @@ static AccelerometerSimulation *sharedAccelerometer = NULL;
|
|||
|
||||
@implementation AccelerometerSimulation
|
||||
|
||||
- (void) dealloc {
|
||||
if (sharedAccelerometer) {
|
||||
[sharedAccelerometer release];
|
||||
sharedAccelerometer = NULL;
|
||||
}
|
||||
[super dealloc];
|
||||
}
|
||||
|
||||
// this is straight from developer guide example for multi-threaded notifications
|
||||
- (void) setUpThreadingSupport {
|
||||
if ( notifications ) return;
|
||||
|
@ -126,7 +134,7 @@ static AccelerometerSimulation *sharedAccelerometer = NULL;
|
|||
};
|
||||
[notificationLock unlock];
|
||||
}
|
||||
|
||||
#ifndef __clang_analyzer__
|
||||
+ (AccelerometerSimulation *)getAccelerometer
|
||||
{
|
||||
if( sharedAccelerometer == NULL )
|
||||
|
@ -134,7 +142,7 @@ static AccelerometerSimulation *sharedAccelerometer = NULL;
|
|||
|
||||
return sharedAccelerometer;
|
||||
}
|
||||
|
||||
#endif
|
||||
- (void)threadLoop:(id)object
|
||||
{
|
||||
char buffer[1024];
|
||||
|
|
Loading…
Reference in New Issue