Re: How to completely release every object allocated when opening a NIB file ?
Re: How to completely release every object allocated when opening a NIB file ?
- Subject: Re: How to completely release every object allocated when opening a NIB file ?
- From: Jérome Foucher <email@hidden>
- Date: Mon, 12 Jan 2004 14:12:52 +0100
On 12 janv. 04, at 13:41, Jvrn Salewski wrote:
am 12.01.2004 10:15 Uhr schrieb Jirome Foucher unter
email@hidden:
Hi all,
I'm having big problems stopping my application from leaking.
- Here's the short story :
My app loads differents NIB files using
[NSBundle loadNibFile:path externalNameTable:NULL
withZone:NSDefaultMallocZone()];
The NIB file only holds a NSWindow which is set to release when
closed.
The owner is a NSWindowController.
When the window closes, it's correctly released (I've traced it).
Jirome,
I've written a sort of custom WindowController, rather a
NibController, that
might help.
To avoid memory leaks, all objects stored in the "topLevelNibObjects"
dictionary recieve an "extra" release message during deallocation (the
owner
of the nib (=self) is responsible to do so in addition to the container
class instance they are stored in).
Thanks. I'll try that.
Jirome
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.