Re: Ownership of nib instances
Re: Ownership of nib instances
- Subject: Re: Ownership of nib instances
- From: Scott Herz <email@hidden>
- Date: Wed, 17 Oct 2001 14:38:00 -0700
From our 2.1 FAQ:
Should I release top level objects at runtime?
Usually, yes. The File's Owner is responsible for releasing any
resources created by the nib. These include any top level objects such
as formatters, custom views, extra window or extra menus. However, there
are a few exceptions to this rule. Windows with the "Release on Close"
flag set do not need to be released. They will release themselves when
they close. Windows controlled by a window controller will also be
release automatically.
On Wednesday, October 17, 2001, at 02:10 PM, Joe Chan wrote:
When I make a new instance of a class in a Nib (not the file owner
instance), who actually owns the object? In other words, who should
release that object? It seems to me that the file owner object some how
has a hidden reference to all those instances, and as the file owner
goes away, so do those objects. (I encountered some EXC_BAD_ACCESS in
the debugger when I tried to manually release those objects.) I can't
seem to find docs about this anywhere.
-----------
Joe Chan
email@hidden
http://www.firstian.com
_______________________________________________
cocoa-dev mailing list
email@hidden
http://www.lists.apple.com/mailman/listinfo/cocoa-dev