On Wed, Jan 14, 2009 at 11:58 PM, Vitaly Ovchinnikov
<vitaly.ovchinni...@gmail.com> wrote:
> Well, OK. I am ready to release all root objects myself. Just tested
> with subclassed NSView from that NIB - it didn't get released
> automatically.
> So I added several -release calls to -dealloc method of my NIB's owner
> and now it will release everything.
> But the problem is still there: -dealloc of my view controller didn't
> get called because array controller still retains it!
> As I wrote above, I added special "killer" method that breaks binding
> and after calling it I can call -release and it will call NIB owner's
> -dealloc. But this is ugly...

It's not clear to me from this response, so just to double check:  do
you -release the array controller when you -release the view?  The
array controller is also a top-level object in your nib, so it needs
to be released.  This will have a similar effect to you calling
-unbind..., but is more correct.  What you are doing with -unbind is
likely leaking NSArrayController instances, so while your NSView will
have its -dealloc called, the array controller will not.


Jason
_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to