mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-25 09:41:15 +00:00
(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:
parent
40d6303135
commit
d6bbf2ead6
1 changed files with 11 additions and 0 deletions
|
@ -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. */
|
||||||
|
|
Loading…
Reference in a new issue