Re: Nib memory management under Garbage Collection

2009-01-24 Thread Rob Keniger
On 16/01/2009, at 2:26 PM, mmalc Crawford wrote: "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

Re: Nib memory management under Garbage Collection

2009-01-15 Thread mmalc Crawford
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 i

Re: Nib memory management under Garbage Collection

2009-01-15 Thread Rob Keniger
On 16/01/2009, at 1:06 PM, j o a r wrote: Under GC you're not responsible for releasing anything. That comment doesn't apply to GC. You have the inverse responsibility though: Making sure that you have strong references to all objects that you're interested in keeping alive. Thanks. Tha

Re: Nib memory management under Garbage Collection

2009-01-15 Thread j o a r
On Jan 15, 2009, at 6:35 PM, Rob Keniger wrote: 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. Note that the files owner isn't necessarily the owner / root of all objects instantiated by the nib

Re: Nib memory management under Garbage Collection

2009-01-15 Thread Rob Keniger
On 16/01/2009, at 11:45 AM, mmalc Crawford wrote: That's fine, but what happens when the Owner goes away? Is it still responsible for setting top-level Nib objects to nil before its - finalize method is called or will the collector clean up the Nib objects automatically?

Re: Nib memory management under Garbage Collection

2009-01-15 Thread mmalc Crawford
On Jan 15, 2009, at 5:03 PM, Rob Keniger wrote: That's fine, but what happens when the Owner goes away? Is it still responsible for setting top-level Nib objects to nil before its - finalize method is called or will the collector clean up the Nib objects automatically?

Nib memory management under Garbage Collection

2009-01-15 Thread Rob Keniger
After reading the previous thread on memory management of Nib objects, I am unsure how it applies to memory-managed apps. The Garbage Collection programming guide says that if you don't want the collector to collect top-level Nib objects, you must maintain a strong reference to them in your