Are NSViews autoreleased or released?
Are NSViews autoreleased or released?
- Subject: Are NSViews autoreleased or released?
- From: Kaspar Fischer <email@hidden>
- Date: Mon, 5 Dec 2005 22:30:55 +0100
Hi,
Are NSViews autoreleased or released? For instance, when a
window gets closed, are the window's views and subviews
released or autoreleased?
If they are released, I should probably deregister the view
(from being an observer) and unbind its contents in -[dealloc].
But what if they are autoreleased? Where can I deregister the
view from being an observer (unbind, resp.) then?
I know of at least one case where a view is autoreleased:
when you call [view removeFromSuperView], see
http://www.cocoabuilder.com/archive/message/cocoa/2004/12/20/124289
But from the unobserving/unbinding point of view, it makes
sense to deregister/unbind immediately and not only when
the autorelease pool is deallocated (because in the latter
case they might be unobserved/unbound in any order).
Thanks,
Kaspar
_______________________________________________
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