Differences From Artifact [06405e2bb2]:
- File
src/OFAutoreleasePool.m
— part of check-in
[c5ef582958]
at
2013-03-04 17:20:15
on branch trunk
— Replace BOOL with bool.
The only places where BOOL is left are those where they are required by
the ABI. (user: js, size: 3021) [annotate] [blame] [check-ins using]
To Artifact [c1b6db103b]:
- File src/OFAutoreleasePool.m — part of check-in [29e4d00225] at 2013-09-15 18:51:51 on branch trunk — OFAutoreleasePool: Free pool cache on thread exit. (user: js, size: 3411) [annotate] [blame] [check-ins using]
| ︙ | ︙ | |||
15 16 17 18 19 20 21 22 23 24 25 26 27 28 | */ #include "config.h" #include <stdlib.h> #import "OFAutoreleasePool.h" #import "macros.h" #if !defined(OF_HAVE_COMPILER_TLS) && defined(OF_HAVE_THREADS) # import "threading.h" # import "OFInitializationFailedException.h" #endif | > | 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 | */ #include "config.h" #include <stdlib.h> #import "OFAutoreleasePool.h" #import "OFAutoreleasePool+Private.h" #import "macros.h" #if !defined(OF_HAVE_COMPILER_TLS) && defined(OF_HAVE_THREADS) # import "threading.h" # import "OFInitializationFailedException.h" #endif |
| ︙ | ︙ | |||
73 74 75 76 77 78 79 80 81 82 83 84 85 86 |
return [super alloc];
}
+ (id)addObject: (id)object
{
return _objc_rootAutorelease(object);
}
- init
{
self = [super init];
@try {
_pool = objc_autoreleasePoolPush();
| > > > > > > > > > > > > > > > > | 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 |
return [super alloc];
}
+ (id)addObject: (id)object
{
return _objc_rootAutorelease(object);
}
+ (void)OF_handleThreadTermination
{
#if !defined(OF_HAVE_COMPILER_TLS) && defined(OF_HAVE_THREADS)
OFAutoreleasePool **cache = of_tlskey_get(cacheKey);
#endif
size_t i;
if (cache != NULL) {
for (i = 0; i < MAX_CACHE_SIZE; i++)
[cache[i] OF_super_dealloc];
free(cache);
cache = NULL;
}
}
- init
{
self = [super init];
@try {
_pool = objc_autoreleasePoolPush();
|
| ︙ | ︙ | |||
111 112 113 114 115 116 117 118 119 120 121 122 123 124 |
[self dealloc];
}
- (void)drain
{
[self dealloc];
}
- (void)dealloc
{
#if !defined(OF_HAVE_COMPILER_TLS) && defined(OF_HAVE_THREADS)
OFAutoreleasePool **cache = of_tlskey_get(cacheKey);
#endif
| > > > > > | 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 |
[self dealloc];
}
- (void)drain
{
[self dealloc];
}
- (void)OF_super_dealloc
{
[super dealloc];
}
- (void)dealloc
{
#if !defined(OF_HAVE_COMPILER_TLS) && defined(OF_HAVE_THREADS)
OFAutoreleasePool **cache = of_tlskey_get(cacheKey);
#endif
|
| ︙ | ︙ |