• 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: (void *)contextInfo
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: (void *)contextInfo


  • Subject: Re: (void *)contextInfo
  • From: Roland King <email@hidden>
  • Date: Wed, 13 Jan 2010 08:47:30 +0800



Nick Zitzmann wrote:

If you're using GC, and the pointer's address is being re-assigned, then it probably got finalized behind your app's back, and so you can emulate retain/release in this case by using the disable/enable methods of NSGarbageCollector.


I didn't understand that bit. "disable/enable methods of NSGarbageCollector", that seems like a very heavy-handed way to stop a pointer from being collected, just shutting GC off.


I never totally understood the section in the GC documents about opaque (void*) pointers and why they need to be specifically handled in order for the garbage collector to find them (it's a pointer to something which turns out to be an object but I'm sure it's a whole load more complicated than that), however it's there and tells you to use a CFRetain()/CFRelease() pair on them if you are using GC.
_______________________________________________


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: (void *)contextInfo
      • From: Nick Zitzmann <email@hidden>
References: 
 >(void *)contextInfo (From: Rainer Standke <email@hidden>)
 >Re: (void *)contextInfo (From: Nick Zitzmann <email@hidden>)

  • Prev by Date: Re: how do you set the value of a UIPickerView programatically? [solved]
  • Next by Date: Re: (void *)contextInfo
  • Previous by thread: Re: (void *)contextInfo
  • Next by thread: Re: (void *)contextInfo
  • Index(es):
    • Date
    • Thread