• 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: Transitioning to GC-supported
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Transitioning to GC-supported


  • Subject: Re: Transitioning to GC-supported
  • From: "Sean McBride" <email@hidden>
  • Date: Tue, 27 Oct 2009 11:44:20 -0400
  • Organization: Rogue Research Inc.

On 10/26/09 8:38 AM, Jens Alfke said:

>> 1. Apply workaround for interior pointers by '[containingObject
>> self];' at
>> the end of the method, to keep the containing object alive.
>
>A valid point, but in my experience this is a rare problem: I have
>never run into an instance of a bug caused by interior pointers.

That entirely depends on one's code and what's it's doing.  If you are,
say, doing some pixel-processing on NSData-based data then you'll be
using -bytes a lot, and need to be careful.  I _have_ been hit by these
bugs, and they are a pain.

Methods to watch out for: bytes, mutableBytes, UTF8String, cString,
fileSystemRepresentation, bitmapData, etc.

The 10.6 release notes mention that the implementation of some of these
has changed to eliminate this problem (presumably by returning a GC-
memory copy), so remember to test on 10.5 too (if you support it).

--
____________________________________________________________
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

References: 
 >Transitioning to GC-supported (From: Dave Keck <email@hidden>)
 >Re: Transitioning to GC-supported (From: Jens Alfke <email@hidden>)

  • Prev by Date: Re: Alternative to stringWithContentsOfURL
  • Next by Date: Re: Alternative to stringWithContentsOfURL
  • Previous by thread: Re: Transitioning to GC-supported
  • Next by thread: Re: Transitioning to GC-supported
  • Index(es):
    • Date
    • Thread