• 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: looking for a memory problem
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: looking for a memory problem


  • Subject: Re: looking for a memory problem
  • From: Sean McBride <email@hidden>
  • Date: Wed, 18 Jul 2012 11:35:40 -0400
  • Organization: Rogue Research Inc.

On Wed, 18 Jul 2012 11:03:31 +1000, Shane Stanley said:

>> writing for GC and ARC is not so different, and you can even switch
>over slowly
>
>Could you elaborate on what you mean by "switch over slowly"? I think I
>understand the idea if one is coming from manual reference counting, but
>I thought GC was essentially all or nothing. Or am I reading something
>into your words that you didn't mean?

Shane,

Sure.  Well, it's all or nothing from the perspective of compiler flags.  When you actually throw the switch from GC to ARC, it's just a one-shot.

But you can prepare your code slowly, in a way that supports both.  ex:
 - replace all use of NSAllocateCollectable with malloc/free
 - change 'retain' to 'strong' in property declarations
 - replace CFMakeCollectable with CFBridgingRelease
 - replace NSMakeCollectable with a nil check and CFBridgingRelease

That's where I'm at anyway.  I'm looking forward to the performance benefits of ARC, but will miss the GC programming model.

--
____________________________________________________________
Sean McBride, B. Eng                 email@hidden
Rogue Research                        www.rogue-research.com
Mac Software Developer              Montréal, Québec, Canada



_______________________________________________

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


  • Follow-Ups:
    • Re: looking for a memory problem
      • From: Shane Stanley <email@hidden>
References: 
 >looking for a memory problem (From: Martin Hewitson <email@hidden>)
 >Re: looking for a memory problem (From: Sean McBride <email@hidden>)
 >Re: looking for a memory problem (From: Shane Stanley <email@hidden>)

  • Prev by Date: Re: KVG generic enough?
  • Next by Date: Re: NSArrayController not rearranging correctly
  • Previous by thread: Re: looking for a memory problem
  • Next by thread: Re: looking for a memory problem
  • Index(es):
    • Date
    • Thread