• 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: When should one call unbind:? (in a GC application)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: When should one call unbind:? (in a GC application)


  • Subject: Re: When should one call unbind:? (in a GC application)
  • From: mmalc crawford <email@hidden>
  • Date: Thu, 1 Nov 2007 10:26:32 -0700


On Nov 1, 2007, at 3:34 AM, Alastair Houghton wrote:

Now I don't know where to call -unbind.  Doing it in -finalize seems
dangerous, what with Apple discouraging it so much.

This is <rdar://5497135> BTW.

Ideally, if you're using GC, you shouldn't need to do this sort of thing because whatever is implementing the binding should be using a nilling weak reference, and can therefore detect when you go away and clean up itself.


No, that doesn't happen unfortunately.


On Oct 31, 2007, at 12:03 PM, Sean McBride wrote:
The new Apple recommendation became:
[...] as documented here:
<http://homepage.mac.com/mmalc/CocoaExamples/controllers.html#unbinding >


I should point out that my hints page does not constitute "official documentation".

That said, the recommendation is still to use - (void)viewWillMoveToSuperview:(NSView*)newSuperview if your view isn't going to go to full screen mode. If it is, you may still have to use dealloc/finalize...

mmalc

_______________________________________________

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: When should one call unbind:? (in a GC application)
      • From: Jim Correia <email@hidden>
References: 
 >Re: When should one call unbind:? (in a GC application) (From: Alastair Houghton <email@hidden>)

  • Prev by Date: Re: Error (1000) creating CGSWindow
  • Next by Date: Re: When should one call unbind:? (in a GC application)
  • Previous by thread: Re: When should one call unbind:? (in a GC application)
  • Next by thread: Re: When should one call unbind:? (in a GC application)
  • Index(es):
    • Date
    • Thread