diff options
Diffstat (limited to 'Source/SPGrowlController.m')
-rw-r--r-- | Source/SPGrowlController.m | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/Source/SPGrowlController.m b/Source/SPGrowlController.m index 0e41a258..13d06f3c 100644 --- a/Source/SPGrowlController.m +++ b/Source/SPGrowlController.m @@ -39,7 +39,7 @@ static SPGrowlController *sharedGrowlController = nil; { @synchronized(self) { if (sharedGrowlController == nil) { - [[self alloc] init]; + sharedGrowlController = [[super allocWithZone:NULL] init]; } } @@ -49,14 +49,8 @@ static SPGrowlController *sharedGrowlController = nil; + (id)allocWithZone:(NSZone *)zone { @synchronized(self) { - if (sharedGrowlController == nil) { - sharedGrowlController = [super allocWithZone:zone]; - - return sharedGrowlController; - } - } - - return nil; // On subsequent allocation attempts return nil + return [[self sharedGrowlController] retain]; + } } - (id)init |