Re: Are NSViews autoreleased or released?
Re: Are NSViews autoreleased or released?
- Subject: Re: Are NSViews autoreleased or released?
- From: Erik Buck <email@hidden>
- Date: Tue, 6 Dec 2005 13:14:19 -0800 (PST)
Generally speaking, you CAN control when auto released objects are released by the auto release pool.
Just create your own auto release pool, then close the window. (which in turn apparently auto releases its views...are you SURE?). Then release your auto release pool. All objects in your auto release pool will be released immediately.
Alternatively:
Consider using a window controller for each window so that you know the top level objects in the window are all released. Then have your window controller register for notification of relevant array elements being dealloced. Then send the notification when array elements are dealloced and use that notification to break any bindings that remain to the dealloced object. Then the release order of the window and the array elements becomes irrelevant.
_______________________________________________
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