gnustep-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Gnustep-cvs] r31629 - in /libs/back/trunk: ./ Source/cairo/ Source/


From: Nicola Pero
Subject: Re: [Gnustep-cvs] r31629 - in /libs/back/trunk: ./ Source/cairo/ Source/gsc/ Source/win32/ Source/winlib/ Source/x11/
Date: Sat, 20 Nov 2010 12:57:59 +0000


On 20 Nov 2010, at 12:44, David Chisnall wrote:

objc_malloc() and friends are GCC-runtime specific. They are not supported by other runtimes. If there is a reason for avoiding malloc(), using either NSZoneMalloc() or NSAllocateCollectable() should be the preferred indirection.

Using malloc() is usually wrong as it can't work with garbage collection. ;-)

objc_malloc() is traditionally used to work with the GNU runtime and the boehm garbage collector. I assume NSAllocateCollectable() could be a reasonable replacement (and gnustep-base will basically direct it to objc_malloc() if using the GNU runtime, and to something else with other runtimes).

Thanks



reply via email to

[Prev in Thread] Current Thread [Next in Thread]