Re: Are Nibs forever?
Re: Are Nibs forever?
- Subject: Re: Are Nibs forever?
- From: Ian was here <email@hidden>
- Date: Thu, 28 Jul 2005 19:30:21 -0700 (PDT)
OK, so what this means then, is that when the window
the view is on is deallocated, then the view is also
deallocated. Therefor, closing the window is not
enough, because my views dealloc: method is not
firing. So if I close AND release the window, then
that would do the trick?
--- Uli Kusterer <email@hidden> wrote:
> 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
>
>
>
____________________________________________________
Start your day with Yahoo! - make it your home page
http://www.yahoo.com/r/hs
_______________________________________________
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