Re: Are Nibs forever?
Re: Are Nibs forever?
- Subject: Re: Are Nibs forever?
- From: Uli Kusterer <email@hidden>
- Date: Fri, 29 Jul 2005 00:25:15 +0200
Am Jul 28, 2005 um 23:49:25 schrieb Ian was here:
When the Nibs owner is released, I have it so it
releases any other nonview objects. Their dealloc:
methods are called. It seems odd that if I release
the view, crash! Otherwise, it remains in memory (the
view's dealloc: method is never called).
This is wrong. The docs say that you should release all *top-level-
objects*. All other objects (like views inside windows etc.) haven't
been retained by you (only by their containing window) and thus you
don't need to release them because they will go away when you release
their container object.
So, it's not view vs. non-view. If a view is a top-level object in
your NIB file, you can release it, if it's inside a window, you
release the window.
Cheers,
-- M. Uli Kusterer
http://www.zathras.de
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden