mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-30 08:21:25 +00:00
MacOS-X compatibility fix for GC
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@27845 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
d3da55f975
commit
d2fa82f877
4 changed files with 12 additions and 12 deletions
|
@ -668,14 +668,9 @@ NSIncrementExtraRefCount(id anObject)
|
|||
inline NSZone *
|
||||
GSObjCZone(NSObject *object)
|
||||
{
|
||||
/* If we have GC enabled, all objects are garbage collected and memory
|
||||
* they allocate should generally be garbage collectable but not scanned
|
||||
* for pointers.
|
||||
* If an object wants to have memory which IS scanned for pointers by the
|
||||
* garbage collector, it should use NSAllocateCollectable() to get it,
|
||||
* rather than using the old zone based memory allocation.
|
||||
/* MacOS-X 10.5 seems to return the default malloc zone if GC is enabled.
|
||||
*/
|
||||
return GSAtomicMallocZone();
|
||||
return NSDefaultMallocZone();
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue