loadNibNamed:owner: Who disposes of the loaded objects?
loadNibNamed:owner: Who disposes of the loaded objects?
- Subject: loadNibNamed:owner: Who disposes of the loaded objects?
- From: "M. Uli Kusterer" <email@hidden>
- Date: Thu, 25 Sep 2003 01:35:58 +0200
Hi,
I'm using [NSBundle loadNibNamed: @"MyNibFile" owner: self]; in one
of my classes' -init method. It works like a charm, but I just
realized that I don't know how I'm supposed to dispose of the loaded
objects.
One of my NIBs contains an NSView with sub-views, another contains
an NSPanel. I have outlets in my class that are set to the loaded
objects. Do I have to release them? I know I need to when I'm dealing
with alloc, new or copy, but what about "load"?
And if I'm not responsible for releasing them, who is? Are they
autoreleased? Then why does my code work? Apple's docs are
suspiciously quiet about this. They only say the objects are loaded
into my object's zone ...
--
Cheers,
M. Uli Kusterer
------------------------------------------------------------
"The Witnesses of TeachText are everywhere..."
http://www.zathras.de
_______________________________________________
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.