Re: Deallocation while key value observers still registered
Re: Deallocation while key value observers still registered
- Subject: Re: Deallocation while key value observers still registered
- From: Simon ONeill <email@hidden>
- Date: Tue, 25 May 2010 16:36:00 +0100
Hi,
I had something perhaps similar. (But have no solution, only possible further information to add).
I believe that registration came in my case from InterfaceBuilder, where I had used the keyed values as entries in various textFields, using IB setup bindings in an NSPanel. (Snow Leopard). Without a solution I am just allowing the leaks by not deallocing.
Would be most interested in solution.
Simon
On 25 May 2010, at 15:54, Kyle Sluder wrote:
> On Tue, May 25, 2010 at 6:14 AM, Gideon King <email@hidden> wrote:
>> An instance 0x11d0ce4b0 of class NMGeneralPrintAccessoryController was deallocated while key value observers were still registered with it. Observation info was leaked, and may even become mistakenly attached to some other object. Set a breakpoint on NSKVODeallocateBreak to stop here in the debugger. Here's the current observation info: <all my observers>
>>
>> But I have put a breakpoint on my dealloc method, and in there, I do deregister for those notifications. Dealloc is called, and I did check that it was the same object, and all the calls to deregister are there. So I don't know how it could *not* be removing the observers.
>
> This sounds off… you're deregistering obeservers in your observee's
> -dealloc? It sounds like object A has observed object B, and object B
> is being dealloced, which is removing its observation on object C, but
> the framework is complaining about object A.
>
> --Kyle Sluder
> _______________________________________________
>
> Cocoa-dev mailing list (email@hidden)
>
> 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:
>
> This email sent to email@hidden
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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:
This email sent to email@hidden