diff --git a/Headers/gnustep/base/NSAutoreleasePool.h b/Headers/gnustep/base/NSAutoreleasePool.h index 465e33ffb..b5b7fd7f3 100644 --- a/Headers/gnustep/base/NSAutoreleasePool.h +++ b/Headers/gnustep/base/NSAutoreleasePool.h @@ -1,5 +1,5 @@ /* Interface for NSAutoreleasePool for GNUStep - Copyright (C) 1995 Free Software Foundation, Inc. + Copyright (C) 1995, 1996 Free Software Foundation, Inc. Written by: R. Andrew McCallum Date: 1995 @@ -24,14 +24,27 @@ #ifndef __NSAutoreleasePool_h_OBJECTS_INCLUDE #define __NSAutoreleasePool_h_OBJECTS_INCLUDE -#include +#include -@interface NSAutoreleasePool:NSObject +struct autorelease_array_list { - NSAutoreleasePool *parent; - unsigned released_count; - unsigned released_size; - id *released; + struct autorelease_array_list *next; + unsigned size; + unsigned count; + id objects[0]; +}; + +@interface NSAutoreleasePool : NSObject +{ + /* For re-setting the current pool when we are dealloc'ed. */ + NSAutoreleasePool *_parent; + /* This necessary for co-existing with exceptions. */ + NSAutoreleasePool *_child; + /* An collection of the objects to be released. */ + struct autorelease_array_list *_released; + struct autorelease_array_list *_released_head; + /* The total number of objects autoreleased in this pool. */ + unsigned _released_count; } + (void)addObject: anObject; @@ -40,6 +53,8 @@ + (void) enableRelease: (BOOL)enable; + (void) setPoolCountThreshhold: (unsigned)c; + (unsigned) autoreleaseCountForObject: anObject; ++ (void) resetTotalAutoreleasedObjects; ++ (unsigned) totalAutoreleasedObjects; @end