• 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: ARC and Manual Memory Management
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


References: 
 >ARC and Manual Memory Management (From: Dave <email@hidden>)

  • Prev by Date: ARC and Manual Memory Management
  • Next by Date: Re: ARC and Manual Memory Management
  • Previous by thread: ARC and Manual Memory Management
  • Next by thread: Re: ARC and Manual Memory Management
  • Index(es):
    • Date
    • Thread