• 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: GC pros and cons
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: GC pros and cons


  • Subject: Re: GC pros and cons
  • From: Clark Cox <email@hidden>
  • Date: Sat, 27 Jun 2009 14:08:49 -0700

On Sat, Jun 27, 2009 at 1:57 PM, James Gregurich<email@hidden> wrote:
>
> Bill,
>
> If you guys are going to some day make that statement the law, then please
> keep in mind that whatever you do has to operate with cross platform C++
> code using standard memory management techniques. Many of us have to deal
> with other unix systems and Windows. We need this stuff to all cleanly
> interoperate with standard code.

Objective-C GC *already* works with cross platform C++ code. Just
CFRetain() your ObjC object before handing it off to something that
doesn't understand GC (such as an STL container, or as a generic void*
stored in unscanned memory, etc.) and CFRelease() it after removing
it.

I have a decent amount of (old) Objective-C++ code that does just this
(e.g. storing Obj-C objects in shared_ptr), and I had nothing to do in
order to get it to work under GC.

--
Clark S. Cox III
email@hidden
_______________________________________________

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: GC pros and cons (From: James Gregurich <email@hidden>)
 >Re: GC pros and cons (From: WT <email@hidden>)
 >Re: GC pros and cons (From: Graham Cox <email@hidden>)
 >Re: GC pros and cons (From: WT <email@hidden>)
 >Re: GC pros and cons (From: Graham Cox <email@hidden>)
 >Re: GC pros and cons (From: Bill Bumgarner <email@hidden>)
 >Re: GC pros and cons (From: James Gregurich <email@hidden>)

  • Prev by Date: Re: GC pros and cons
  • Next by Date: Re: GC pros and cons
  • Previous by thread: Re: GC pros and cons
  • Next by thread: Re: GC pros and cons
  • Index(es):
    • Date
    • Thread