On Tue, Mar 10, 2009 at 1:23 PM, Robert Mullen <robe...@autowc.com> wrote: > I have an app built using garbage collection. I am begin asked to introduce > a framework that is non garbage collected but the compiler will not allow > this. I have set GC supported on the framework and recompiled which works > but the framework causes cryptic errors once compiled in this manner. I am > not really experienced in this manner and have read the docs which make me > believe that the code should be fine but it is not. Am I misreading the > docs? Is there a way to get GC and non GC code to live together > happily?
GC is all-or-nothing. In any given process, either it is garbage collected or it is not. If it uses GC, all code which loads into the process must be GC-capable. If it does not use GC, all code must be retain/release capable. The way Cocoa's GC works, you can't just flip the switch on some old code and have it work. If you want to use this framework, you'll have to go through and actually fix it up to be properly GC capable. Apple's Garbage Collection Programming Guide has a small section on old-style patterns which don't translate across to a GC environment which may be helpful to you: http://developer.apple.com/documentation/Cocoa/Conceptual/GarbageCollection/Articles/gcInapplicablePatterns.html#//apple_ref/doc/uid/TP40006762 Mike _______________________________________________ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) 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: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com