ObjFW  Diff

Differences From Artifact [e9bf9ceb4f]:

To Artifact [ae2a82f384]:


44
45
46
47
48
49
50
51
52
53
54
55
56
57
58

	if (!of_tlskey_new(&cacheKey))
		@throw [OFInitializationFailedException
		    exceptionWithClass: self];
}
#endif

+ alloc
{
#if !defined(OF_HAVE_COMPILER_TLS) && defined(OF_HAVE_THREADS)
	OFAutoreleasePool **cache = of_tlskey_get(cacheKey);
#endif

	if (cache != NULL) {
		for (size_t i = 0; i < MAX_CACHE_SIZE; i++) {







|







44
45
46
47
48
49
50
51
52
53
54
55
56
57
58

	if (!of_tlskey_new(&cacheKey))
		@throw [OFInitializationFailedException
		    exceptionWithClass: self];
}
#endif

+ (instancetype)alloc
{
#if !defined(OF_HAVE_COMPILER_TLS) && defined(OF_HAVE_THREADS)
	OFAutoreleasePool **cache = of_tlskey_get(cacheKey);
#endif

	if (cache != NULL) {
		for (size_t i = 0; i < MAX_CACHE_SIZE; i++) {
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
			[cache[i] of_super_dealloc];

		free(cache);
		cache = NULL;
	}
}

- init
{
	self = [super init];

	@try {
		_pool = objc_autoreleasePoolPush();

		_objc_rootAutorelease(self);







|







83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
			[cache[i] of_super_dealloc];

		free(cache);
		cache = NULL;
	}
}

- (instancetype)init
{
	self = [super init];

	@try {
		_pool = objc_autoreleasePoolPush();

		_objc_rootAutorelease(self);
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
			}
		}
	}

	[super dealloc];
}

- retain
{
	OF_UNRECOGNIZED_SELECTOR
}

- autorelease
{
	OF_UNRECOGNIZED_SELECTOR
}
@end







|




|




166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
			}
		}
	}

	[super dealloc];
}

- (instancetype)retain
{
	OF_UNRECOGNIZED_SELECTOR
}

- (instancetype)autorelease
{
	OF_UNRECOGNIZED_SELECTOR
}
@end