V4CC - garbage collection question

Shaun Wexler dev at macfoh.com
Wed Sep 20 12:27:17 CDT 2006


On Sep 20, 2006, at 10:09 AM, Dave Parizek wrote:

> I was looking at the Mac OSX LEOPARD preview.

You might have noticed that all GC-enabled apps become non-responsive  
periodically?

> It is common knowledge that we will have garbage collection with  
> Leopard and XCode 3.  I read about it and it says to use garbage  
> collection you basically check a box and tell XCode 3 to use it for  
> a project, but that all the frameworks you use must also be enabled  
> for garbage collection.

If your curiosity is peaking, you might check out the current objc  
headers.  Garbage collectible zones are available in Tiger, you can  
set a flag in Xcode 2, but the new language additions are not built  
into the ObjC v1 runtime.

> Are you guys part of Apple's Developer Connection such that you can  
> get XCode 3 now and do a version of the Valentina V4CC frameworks  
> that uses garbage collection?  Or will we need to wait until  
> Leopard is out to the public to be able to play with this?

I can suggest quite honestly that you really don't want to have  
this.  Having several thousand or even millions of referenced objects  
in the auto zone would cause a complete stall of your app each time  
the entirety of your strong pointers were scanned by GC... it's not a  
pretty picture.  It might be inevitable for V4CC, though GC in  
general is not recommended for high-performance applications.

FYI, Valentina'c C++ objects (although not the V4CC wrappers  
themselves) use inline refcounts.  Any objects which use a custom  
zone allocator can work within a GC-enabled system, but proper  
refcounting semantics must still be applied.  Even with GC, you can  
implement refcounting, but it's a NOP underneath if they're collectible.
-- 
Shaun Wexler
MacFOH
http://www.macfoh.com

Efficiency is intelligent laziness.




More information about the Valentina-beta mailing list