Use an autorelease pool.

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@3083 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Richard Frith-MacDonald 1998-10-19 05:04:18 +00:00
parent b626c1f0c0
commit db4b3a3440

View file

@ -12,9 +12,11 @@ Any hints?
#include <gnustep/base/Queue.h>
#include <Foundation/NSValue.h>
#include <Foundation/NSAutoreleasePool.h>
int main ()
{
NSAutoreleasePool *pool = [NSAutoreleasePool new];
Array *a;
CircularArray *c;
Queue *q;
@ -42,5 +44,6 @@ int main ()
[q insertObject: [NSObject new] atIndex: 2]; // core dump!
printf("count: %d\n", [q count]);
[pool release];
exit (0);
}