• 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: KVO can be unsafe in -init?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


References: 
 >KVO can be unsafe in -init? (From: John Chang <email@hidden>)
 >Re: KVO can be unsafe in -init? (From: Graham Cox <email@hidden>)
 >Re: KVO can be unsafe in -init? (From: John Chang <email@hidden>)
 >Re: KVO can be unsafe in -init? (From: Roland King <email@hidden>)
 >Re: KVO can be unsafe in -init? (From: Dave Keck <email@hidden>)

  • Prev by Date: Re: KVO can be unsafe in -init?
  • Next by Date: Re: @property (retain) - Do I need to release in dealloc?
  • Previous by thread: Re: KVO can be unsafe in -init?
  • Next by thread: Re: KVO can be unsafe in -init?
  • Index(es):
    • Date
    • Thread