Re: NSenu and memory ownership
Re: NSenu and memory ownership
- Subject: Re: NSenu and memory ownership
- From: "I. Savant" <email@hidden>
- Date: Sat, 26 Jul 2008 00:09:11 -0400
While this is true, I'm using - (NSMenuItem *)itemWithTitle:(NSString
*)aString to get the item if it exists and using that pointer from
then on out instead of replacing it. So, let's say I want to modify
the File menu, if I have a pointer to it when the app closes, should I
be worried about freeing it if it was generated from a nib file and
not procedurally by me in the code?
A) Everything's freed when your app terminates, so it a little late to
be worrying about memory management (it's while it's running that this
truly matters).
B) Get it right anyway because proper memory management is the key to
an app that doesn't suck.
C) Read this:
http://developer.apple.com/documentation/Cocoa/Conceptual/MemoryMgmt/Tasks/MemoryManagementRules.html
Study it. Devote your life to its happiness. Castrate yourself and
drink phenolbarbitol if it asks you to, if only to belong ...
--
I.S.
_______________________________________________
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