• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: NSenu and memory ownership
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


References: 
 >Re: NSenu and memory ownership (From: Caleb Strockbine <email@hidden>)
 >Re: NSenu and memory ownership (From: "Wesley Smith" <email@hidden>)

  • Prev by Date: Re: Repositioning a content view w/in a window
  • Next by Date: Re: Problem when archiving data: [_NSViewGState encodeWithCoder:] unrecognized selector
  • Previous by thread: Re: NSenu and memory ownership
  • Next by thread: Senior Cocoa Developer Needed
  • Index(es):
    • Date
    • Thread