Re: Stupid objective-c question
Re: Stupid objective-c question
- Subject: Re: Stupid objective-c question
- From: Alastair Houghton <email@hidden>
- Date: Fri, 23 Sep 2016 09:52:17 +0100
On 23 Sep 2016, at 09:36, Alastair Houghton <email@hidden> wrote:
>
> Note that you can use *any* type for your variable; in some ways, it might make sense to use a non-pointer type, just to make clear that it’s the address that matters, e.g.
>
> static const int kMyContext = 0xabadf00d;
On second thoughts, it might also be best not to use “const”, as that might conceivably also get coalesced. So
static int kMyContext;
would do. No need to initialise - you don’t care about the value.
Kind regards,
Alastair.
--
http://alastairs-place.net
_______________________________________________
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