31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
|
#ifndef _WIN32
static pthread_key_t first_key, last_key;
#else
static DWORD first_key, last_key;
#endif
static void
release_all(void *list)
{
#ifndef _WIN32
void *first = pthread_getspecific(first_key);
#else
void *first = TlsGetValue(first_key);
#endif
if (first != NULL)
[(OFAutoreleasePool*)first release];
}
@implementation OFAutoreleasePool
+ (void)initialize
{
if (self != [OFAutoreleasePool class])
return;
|
>
>
|
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
|
#ifndef _WIN32
static pthread_key_t first_key, last_key;
#else
static DWORD first_key, last_key;
#endif
#ifndef _WIN32 /* Not used on Win32 yet */
static void
release_all(void *list)
{
#ifndef _WIN32
void *first = pthread_getspecific(first_key);
#else
void *first = TlsGetValue(first_key);
#endif
if (first != NULL)
[(OFAutoreleasePool*)first release];
}
#endif
@implementation OFAutoreleasePool
+ (void)initialize
{
if (self != [OFAutoreleasePool class])
return;
|