Changeset 3794 for trunk/Additions

Show
Ignore:
Timestamp:
07/18/08 17:42:24 (4 months ago)
Author:
timothy
Message:

Fix the real leaks found by the clang static analyzer. #1260

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/Additions/NSNotificationAdditions.m

    r3729 r3794  
    3030        if( pthread_main_np() ) return [self postNotificationName:name object:object userInfo:userInfo]; 
    3131 
     32        // The info dictionary is released in _postNotificationName. 
    3233        NSMutableDictionary *info = [[NSMutableDictionary allocWithZone:nil] initWithCapacity:3]; 
    3334        if( name ) [info setObject:name forKey:@"name"]; 
     
    4546        [[self defaultCenter] postNotificationName:name object:object userInfo:userInfo]; 
    4647 
    47         [info release]; 
     48        [info release]; // Balance the alloc in postNotificationOnMainThreadWithName. 
    4849} 
    4950@end