• 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: Subclass observers on dealloc
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Subclass observers on dealloc


  • Subject: Re: Subclass observers on dealloc
  • From: "Julien Jalon" <email@hidden>
  • Date: Thu, 1 Feb 2007 00:51:26 +0100

The problem is that removing key observers on self is too late at
dealloc time and you will likely see an error log for that in the
console...

--
Julien

On 1/31/07, Ken Tozier <email@hidden> wrote:
Hi

I have some sub classes of a custom NSView class that perform various
actions in response to changes in the view. Since the sub classes are
basically watching other parts of themselves, I'm wondering whether
it's necessary to call

[self removeObserver: self
                forKeyPath: inProperty];

in the dealloc method. In this special case, will dealloc
automatically free up the observers or are observers stored somewhere
else like the application, or Objective C runtime?

TIA

Ken
_______________________________________________

Cocoa-dev mailing list (email@hidden)

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)

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: 
 >Subclass observers on dealloc (From: Ken Tozier <email@hidden>)

  • Prev by Date: NSTableView display not being refreshed after a background refresh
  • Next by Date: Re: Is the "id" type an immovable pointer? Or a movable handle
  • Previous by thread: Re: Subclass observers on dealloc
  • Next by thread: -[NSDateFormatter dateFromString:] and non-standard formats
  • Index(es):
    • Date
    • Thread