Re: ARC and Manual Memory Management
Re: ARC and Manual Memory Management
- Subject: Re: ARC and Manual Memory Management
- From: SevenBits <email@hidden>
- Date: Mon, 10 Aug 2015 08:06:36 -0400
On Monday, August 10, 2015, Dave <email@hidden> wrote:
> Hi,
>
> Has anyone come up with a way of having the source code support both ARC
> and Manual Memory Management without using #IFDEF or #IF ?
You could use a macro, and if ARC is enabled, then simply have it evaluated
to do nothing. This is common in other languages such as C to e.g make
debuging printouts.
>
> I’ve never understood why the compiler doesn’t just ignore code like:
>
> [super dealloc];
>
> [MyObj release];
>
> If it’s being compiled for ARC, that way both could be compiled with the
> same source code or is there more to it?
>
> Cheers
> Dave
>
>
> _______________________________________________
>
> Cocoa-dev mailing list (email@hidden <javascript:;>)
>
> 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 <javascript:;>
_______________________________________________
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