Re: Stupid objective-c question
Re: Stupid objective-c question
- Subject: Re: Stupid objective-c question
- From: Jonathan Mitchell <email@hidden>
- Date: Fri, 23 Sep 2016 10:19:38 +0100
> On 23 Sep 2016, at 10:04, Quincey Morris <email@hidden> wrote.
>
> As previously mentioned, the safest way to do this is:
>
>> static void* kMyContext = &kMyContext;
>
Thats a neat trick. It’s not an initialisation that I have seen before and on first glance I thought it was a typo but it works.
I normally go with:
static char myContext;
However, being able to ditch the address of operator has some appeal.
_______________________________________________
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