From cb61138ef911032899ac1a6b025eaa80d3811f96 Mon Sep 17 00:00:00 2001 From: mccallum Date: Sat, 30 Mar 1996 22:20:43 +0000 Subject: [PATCH] Declare new ivars and methods. git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@1307 72102866-910b-0410-8b05-ffd578937521 --- Headers/gnustep/base/NSAutoreleasePool.h | 29 ++++++++++++++++++------ 1 file changed, 22 insertions(+), 7 deletions(-) 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