Make CFRetain() / CFRelease() behaviour dependent on GC mode.

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@33177 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
theraven 2011-05-28 15:15:05 +00:00
parent 6bf998ffe7
commit 84a09a6d75

View file

@ -32,14 +32,25 @@ static NSGarbageCollector *collector = nil;
#include <objc/objc-auto.h>
id CFRetain(id obj)
{
if (collector)
{
return objc_gc_retain(obj);
}
return [obj retain];
}
void CFRelease(id obj)
{
if (collector)
{
objc_gc_release(obj);
}
else
{
[obj release];
}
}
@implementation NSGarbageCollector