Re: Problem with NSMutableDictionary
Re: Problem with NSMutableDictionary
- Subject: Re: Problem with NSMutableDictionary
- From: Andrew Farmer <email@hidden>
- Date: Sat, 18 Aug 2007 13:02:21 -0700
On 18 Aug 07, at 11:57, Francis Derive wrote:
It is a cocoa app.
- An action of the app delegate is to
- initialize a window controller : dsUserMainMenuWindowCtrl =
[[DSMainMenuWindowController allocWithZone:[self zone]]
initForUserLand:@"fr"
- show the window controller's window
- The init implementation of the window controller
- loads its nib
- initializes its NSMutableDictionary *instance variable :
NSMutableDictionary *activeAppsLanguageStrings =
[NSMutableDictionary dictionaryWithCapacity:1];
[NSMutableDictionary dictionaryWithCapacity:] returns an autoreleased
dictionary (read the Cocoa memory management rules for an explanation
of why this happens). As you don't appear to be explicitly retaining
it in your code, it's getting released.
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden