Declare new ivars and methods.

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@1307 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Andrew McCallum 1996-03-30 22:20:43 +00:00
parent f0408db3fb
commit 7e13e4966d

View file

@ -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 <mccallum@gnu.ai.mit.edu>
Date: 1995
@ -24,14 +24,27 @@
#ifndef __NSAutoreleasePool_h_OBJECTS_INCLUDE
#define __NSAutoreleasePool_h_OBJECTS_INCLUDE
#include <Foundation/NSObject.h>
#include <objects/stdobjects.h>
@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