diff options
Diffstat (limited to 'Source/SPQueryController.m')
-rw-r--r-- | Source/SPQueryController.m | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/Source/SPQueryController.m b/Source/SPQueryController.m index fec04630..b7fd77c3 100644 --- a/Source/SPQueryController.m +++ b/Source/SPQueryController.m @@ -62,7 +62,7 @@ static SPQueryController *sharedQueryController = nil; { @synchronized(self) { if (sharedQueryController == nil) { - [[self alloc] init]; + sharedQueryController = [[super allocWithZone:NULL] init]; } } @@ -72,14 +72,8 @@ static SPQueryController *sharedQueryController = nil; + (id)allocWithZone:(NSZone *)zone { @synchronized(self) { - if (sharedQueryController == nil) { - sharedQueryController = [super allocWithZone:zone]; - - return sharedQueryController; - } + return [[self sharedQueryController] retain]; } - - return nil; // On subsequent allocation attempts return nil } - (id)init |