Re: (void *)contextInfo
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