git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@15020 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Richard Frith-Macdonald 2002-11-19 15:50:31 +00:00
parent bfeb8dbf69
commit e4005a929c
2 changed files with 11 additions and 0 deletions

View file

@ -168,6 +168,8 @@ static BOOL isCollecting = NO;
{
allObjects = (_GCObjectList*)
NSAllocateObject([_GCObjectList class], 0, NSDefaultMallocZone());
allObjects->gc.next = allObjects;
allObjects->gc.previous = allObjects;
}
}

View file

@ -1,4 +1,5 @@
#include <Foundation/Foundation.h>
#include <gnustep/base/GCObject.h>
#include <stdio.h>
@ -37,6 +38,14 @@ int main ()
NSString *s;
NSArray *a = [NSArray arrayWithObjects: @"a", @"b", nil];
o = [GCMutableArray new];
x = [GCMutableArray new];
[o addObject: x];
[x addObject: o];
[o release];
[x release];
[GCObject gcCollectGarbage];
o = [NSDictionary dictionaryWithObjectsAndKeys:
@"test", @"one",
[NSNumber numberWithBool: YES], @"two",