• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Problems with object observing own key
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Problems with object observing own key


  • Subject: Re: Problems with object observing own key
  • From: "Adam R. Maxwell" <email@hidden>
  • Date: Sun, 11 May 2008 15:13:21 -0700


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
_______________________________________________

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


References: 
 >Problems with object observing own key (From: Colin Cornaby <email@hidden>)
 >Re: Problems with object observing own key (From: "Hamish Allan" <email@hidden>)
 >Re: Problems with object observing own key (From: Colin Cornaby <email@hidden>)
 >Re: Problems with object observing own key (From: "Kyle Sluder" <email@hidden>)
 >Re: Problems with object observing own key (From: Colin Cornaby <email@hidden>)

  • Prev by Date: Re: Cocoa string to carbon compatible C string
  • Next by Date: Re: Cocoa string to carbon compatible C string
  • Previous by thread: Re: Problems with object observing own key
  • Next by thread: Extended Tool Tips
  • Index(es):
    • Date
    • Thread