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 protected])

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to