• 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: Best place to remove observer for NSViewBoundsDidChangeNotification
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Best place to remove observer for NSViewBoundsDidChangeNotification


  • Subject: Re: Best place to remove observer for NSViewBoundsDidChangeNotification
  • From: Jonathan Dann <email@hidden>
  • Date: Mon, 25 Feb 2008 23:30:46 +0000


On 25 Feb 2008, at 23:15, Jerry Krinock wrote:

I presume that sending a notification to a deallocced object causes a crash?

Invariably! ;)

Oh, yes, it will bite you. Says so right in the documentation of - [NSDocument close].

Funny how I read that so many times last week when overriding - canCloseDocument: but then forget immediately.


When I had a problem like this one time I ended my -dealloc like this:

   [super dealloc] ;
   self = nil ;
}

I'll try it, just looking for a 'clean' implementation, so I unregister at the right point.
_______________________________________________


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: 
 >Best place to remove observer for NSViewBoundsDidChangeNotification (From: Jonathan Dann <email@hidden>)
 >Re: Best place to remove observer for NSViewBoundsDidChangeNotification (From: Jerry Krinock <email@hidden>)

  • Prev by Date: Re: How do copy:/past: messages get sent to NSDocument?
  • Next by Date: Re: Drawing to a PDF image representation
  • Previous by thread: Re: Best place to remove observer for NSViewBoundsDidChangeNotification
  • Next by thread: NSTreeController with Garbage Collection without CoreData causes problems
  • Index(es):
    • Date
    • Thread