FROM : Adam R. Maxwell
DATE : Mon May 12 00:13:21 2008
On May 11, 2008, at 2:53 PM, Colin Cornaby wrote:
> But see, that's the thing. My objects dealloc method fires AFTER the
> warning appears, so my object hasn't actually been deallocated yet.
>
> In the deallocation my object removes the observers from itself. If
> my object was actually deallocating first, I should be getting this
> message.
>
> I'll do some poking around, but I don't think this is a memory
> management issue. Wouldn't be the first time I've had to eat my
> words though. :p
I don't think this is a memory management issue; it's come up before
on the list:
http://lists.apple.com/archives/Cocoa-dev/2006/Jul/msg00009.html
http://lists.apple.com/archives/cocoa-dev//2007/Dec/msg01217.html
Based on other posts, I don't think there's a general solution, other
than to avoid doing this sort of cleanup in -dealloc. I remove/add
observers in viewWillMoveToSuperview for NSView subclasses (which it
looks like you might have?).
hth,
Adam
DATE : Mon May 12 00:13:21 2008
On May 11, 2008, at 2:53 PM, Colin Cornaby wrote:
> But see, that's the thing. My objects dealloc method fires AFTER the
> warning appears, so my object hasn't actually been deallocated yet.
>
> In the deallocation my object removes the observers from itself. If
> my object was actually deallocating first, I should be getting this
> message.
>
> I'll do some poking around, but I don't think this is a memory
> management issue. Wouldn't be the first time I've had to eat my
> words though. :p
I don't think this is a memory management issue; it's come up before
on the list:
http://lists.apple.com/archives/Cocoa-dev/2006/Jul/msg00009.html
http://lists.apple.com/archives/cocoa-dev//2007/Dec/msg01217.html
Based on other posts, I don't think there's a general solution, other
than to avoid doing this sort of cleanup in -dealloc. I remove/add
observers in viewWillMoveToSuperview for NSView subclasses (which it
looks like you might have?).
hth,
Adam
| Related mails | Author | Date |
|---|---|---|
| Colin Cornaby | May 11, 22:36 | |
| Hamish Allan | May 11, 23:08 | |
| Colin Cornaby | May 11, 23:19 | |
| Kyle Sluder | May 11, 23:47 | |
| Colin Cornaby | May 11, 23:53 | |
| Mike Abdullah | May 12, 00:09 | |
| Adam R. Maxwell | May 12, 00:13 |






Cocoa mail archive

