• 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
Right place to unobserve notifications in a document
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Right place to unobserve notifications in a document


  • Subject: Right place to unobserve notifications in a document
  • From: Negm-Awad Amin <email@hidden>
  • Date: Mon, 18 Aug 2008 11:59:36 +0200

Hi,

for some teaching reasons I have a document class, which observes a notification. Of course I have to unobserve this notification, when the document is closed. Doing this in -dealloc is no good design (fuunctional overhead in -dealloc, garbage collection …).

But I read in the documentation, that -close (myDocument) wouldn't be called in some situations. Is there a save place to unobserve notifications? (Or providing other clean-up.) I couldn't find a hint in the documentation!?

Cheers

Amin Negm-Awad
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


  • Follow-Ups:
    • Re: Right place to unobserve notifications in a document
      • From: "Michael Ash" <email@hidden>
  • Prev by Date: Re: NSUInteger hash
  • Next by Date: Hex representation of NSString
  • Previous by thread: Re: NSOutlineView
  • Next by thread: Re: Right place to unobserve notifications in a document
  • Index(es):
    • Date
    • Thread