Re: GC pros and cons
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