Re: KVO can be unsafe in -init?
Re: KVO can be unsafe in -init?
- Subject: Re: KVO can be unsafe in -init?
- From: Keith Duncan <email@hidden>
- Date: Wed, 09 Sep 2009 11:55:24 +0100
On 9 Sep 2009, at 11:21, Dave Keck wrote:
static void *const MyClass_KVOContext = (void *)&MyClass_KVOContext;
That certainly is unusual, I use the following macro:
#define NSSTRING_CONTEXT(var) static NSString *var = @#var
then use the address of the identifier passed as var. This has the
benefit of allowing you to print the dereferenced context pointer
during debugging.
Keith
_______________________________________________
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