mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-22 16:33:29 +00:00
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:
parent
b626c1f0c0
commit
db4b3a3440
1 changed files with 3 additions and 0 deletions
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue