• 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
NSWindowController deallocation does not remove key value observing
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

NSWindowController deallocation does not remove key value observing


  • Subject: NSWindowController deallocation does not remove key value observing
  • From: Guy Meyer <email@hidden>
  • Date: Sat, 03 Jan 2009 02:39:21 +0200


Hi

I have got an NSWindowController subclass which loads a nib window with few NSControls. These NSControls are bound to some other objects.

When the window is closed, the NSWindowController is being deallocated and all it is NSControls sub views are also being deallocated (as it should be), however these deallocated objects do not remove their key value observers from the observed object.

When the observed object issues "infoForBinding" selector you can see there are still references to the deallocated objects.

Is there any solution to the above, beside hardwiring all those controls and issuing "unbind" prior to the deallocation ?

Issuing [[NSNotificationCenter defaultCenter] removeObserver:self] from the NSWindowController prior to deallocation deosn't make a difference.

Thanks

Guy


_______________________________________________

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


  • Prev by Date: Re: Which language to get started with cocoa development?
  • Next by Date: New MacBookPro and DisplayID w/two graphics cards
  • Previous by thread: Re: Binding of "Object" and "Value" in NSPopupButtonCell
  • Next by thread: New MacBookPro and DisplayID w/two graphics cards
  • Index(es):
    • Date
    • Thread