• 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: Nib memory management under Garbage Collection
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Nib memory management under Garbage Collection


  • Subject: Re: Nib memory management under Garbage Collection
  • From: mmalc Crawford <email@hidden>
  • Date: Thu, 15 Jan 2009 20:26:27 -0800


On Jan 15, 2009, at 6:35 PM, Rob Keniger wrote:

Well, yes, I've read that document several times already, and as far as I can tell the Nib objects should just get cleaned up automatically as their root (the File's Owner) is no longer hanging around. I was just a bit confused by this page in the Memory Management guide:

http://developer.apple.com/documentation/Cocoa/Conceptual/MemoryMgmt/Articles/MemMgmtNibObjects.html

"The File’s Owner of a nib file is typically responsible for releasing the top-level objects in a nib file as well as any non- object resources created by the objects in the nib."

"Since the collector follows strong references from root objects, and treats as garbage all objects that cannot be reached from a root object, you must ensure that there are strong references to all top- level objects in a nib file (including for example, stand-alone controllers)—otherwise they will be collected. You can create a strong reference simply by adding an outlet to the File's Owner and connecting it to a top-level object. (In practice this is rarely likely to be an issue.)"


Nib Files: <http://developer.apple.com/documentation/Cocoa/Conceptual/GarbageCollection/Articles/gcEssentials.html >

mmalc

_______________________________________________

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


  • Follow-Ups:
    • Re: Nib memory management under Garbage Collection
      • From: Rob Keniger <email@hidden>
References: 
 >Nib memory management under Garbage Collection (From: Rob Keniger <email@hidden>)
 >Re: Nib memory management under Garbage Collection (From: mmalc Crawford <email@hidden>)
 >Re: Nib memory management under Garbage Collection (From: Rob Keniger <email@hidden>)

  • Prev by Date: formatting toolbar-please help
  • Next by Date: Re: Manipulating QC input ports with QCRenderer
  • Previous by thread: Re: Nib memory management under Garbage Collection
  • Next by thread: Re: Nib memory management under Garbage Collection
  • Index(es):
    • Date
    • Thread