On 20 Nov 2010, at 14:25, Nicola Pero wrote:

> If boehm garbage collection is being used, I can't see a particular reason to 
> manage C memory manually using malloc() and free();
> using objc_malloc() and objc_free() (btw, objc_free() is an empty operation 
> in that case) provides garbage collection for C memory
> too, and makes sure that you don't crash because you forget that you have a 
> reference to an garbage-collected Objective-C object
> in your C memory.

If using the Boehm GC, then you are using the GCC runtime.  In this case, 
NSAllocateCollectable() will be using objc_malloc().  If using the GNUstep or 
Apple runtimes, objc_malloc() is not implemented, and we have no way of 
distinguishing whether objc_malloc() should wrap NSAllocateCollectable() with 
the scanned option, without the scanned option, or malloc().

David

-- Sent from my PDP-11


_______________________________________________
Gnustep-dev mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/gnustep-dev

Reply via email to