• 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: Cocoa bug? release/removeObserver from inside observeValueForKeyPath
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Cocoa bug? release/removeObserver from inside observeValueForKeyPath


  • Subject: Re: Cocoa bug? release/removeObserver from inside observeValueForKeyPath
  • From: "Hamish Allan" <email@hidden>
  • Date: Thu, 29 May 2008 23:53:11 +0100

On Thu, May 29, 2008 at 11:15 PM, Geoff Schmidt <email@hidden> wrote:

> 3) If this is already known, is there a customary pattern for avoiding the
> problem? "Never release from observeValueForKeyPath" is a bit harsh!

I don't know if it's known, but you could try [obj
performSelector:@selector(release) withObject:nil afterDelay:0]
instead of [obj release] if you don't mind getting the extraneous
observeValueForKeyPath:... for that obj (it could have an "about to be
released" flag which would cause it to ignore the
observeValueForKeyPath:...)

Hamish
_______________________________________________

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: Cocoa bug? release/removeObserver from inside observeValueForKeyPath
      • From: Kai <email@hidden>
References: 
 >Cocoa bug? release/removeObserver from inside observeValueForKeyPath (From: Geoff Schmidt <email@hidden>)

  • Prev by Date: Re: newbie question: menu item appears when app runs, but is not visible in NIB
  • Next by Date: filtering a list like address book
  • Previous by thread: Cocoa bug? release/removeObserver from inside observeValueForKeyPath
  • Next by thread: Re: Cocoa bug? release/removeObserver from inside observeValueForKeyPath
  • Index(es):
    • Date
    • Thread