(struct autorelease_cache): New data type.

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@1519 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Andrew McCallum 1996-05-12 00:39:49 +00:00
parent 40d6303135
commit d6bbf2ead6

View file

@ -26,6 +26,8 @@
#include <gnustep/base/preface.h> #include <gnustep/base/preface.h>
/* Each pool holds its objects-to-be-released in a linked-list of
these structures. */
struct autorelease_array_list struct autorelease_array_list
{ {
struct autorelease_array_list *next; struct autorelease_array_list *next;
@ -34,6 +36,15 @@ struct autorelease_array_list
id objects[0]; id objects[0];
}; };
/* This structure holds a per-thread cache of NSAutoreleasePool objects,
so they don't have to be alloc/dealloc'ed each time. */
struct autorelease_cache
{
id *cache;
int cache_size;
int cache_count;
};
@interface NSAutoreleasePool : NSObject @interface NSAutoreleasePool : NSObject
{ {
/* For re-setting the current pool when we are dealloc'ed. */ /* For re-setting the current pool when we are dealloc'ed. */