mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-22 16:33:29 +00:00
Tidied
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@15020 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
bfeb8dbf69
commit
e4005a929c
2 changed files with 11 additions and 0 deletions
|
@ -168,6 +168,8 @@ static BOOL isCollecting = NO;
|
|||
{
|
||||
allObjects = (_GCObjectList*)
|
||||
NSAllocateObject([_GCObjectList class], 0, NSDefaultMallocZone());
|
||||
allObjects->gc.next = allObjects;
|
||||
allObjects->gc.previous = allObjects;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -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",
|
||||
|
|
Loading…
Reference in a new issue