• 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: Guidelines for Cocoa frameworks supporting garbage collection?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Guidelines for Cocoa frameworks supporting garbage collection?


  • Subject: Re: Guidelines for Cocoa frameworks supporting garbage collection?
  • From: Quincey Morris <email@hidden>
  • Date: Sun, 6 Jul 2008 10:14:15 -0700


On Jul 6, 2008, at 05:45, Bill Cheeseman wrote:

So, back to the OQ. I am now inclined to think that, at least in my
circumstances (a shared framework properly balancing CFRetain and
CFRelease), I do NOT need to use the __strong keyword for the CFType- derived
instance variables, in order to support garbage collection. Any
disagreement?

No disagreement ... just footnotes:

-- #1 Provided you manage memory just like a non-GC app (so don't call CFMakeCollectable).

-- #2 Provided you don't depend on any autorelease-related behavior for CF objects (so be careful with those few things that return "autoreleased" CF objects, and don't cast bridgeable objects over to their NS versions to call 'autorelease')

-- #3 Provided you add duplicates of any CFRelease calls inside 'dealloc' methods to the corresponding 'finalize' methods, to avoid leaking those objects.

Most likely you've already got #1 covered, possibly #2 won't affect the CF objects you're using, and #3 is easy if you haven't done it already.


_______________________________________________

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: 
 >Re: Guidelines for Cocoa frameworks supporting garbage collection? (From: Bill Cheeseman <email@hidden>)

  • Prev by Date: Re: Guidelines for Cocoa frameworks supporting garbage collection?
  • Next by Date: Re: Stopping actions mid stream
  • Previous by thread: Re: Guidelines for Cocoa frameworks supporting garbage collection?
  • Next by thread: Re: Guidelines for Cocoa frameworks supporting garbage collection?
  • Index(es):
    • Date
    • Thread