151
152
153
154
155
156
157
158
159
160
161
162
163
164
|
destructor = NULL;
@synchronized (tlskeys) {
@try {
listobj = [tlskeys append: self];
} @catch (OFException *e) {
listobj = NULL;
[self dealloc];
@throw e;
}
}
return self;
|
>
>
>
>
>
|
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
|
destructor = NULL;
@synchronized (tlskeys) {
@try {
listobj = [tlskeys append: self];
} @catch (OFException *e) {
/*
* We can't use [super dealloc] on OS X here.
* Compiler bug? Anyway, [self dealloc] will do here
* as we check listobj != NULL in dealloc.
*/
listobj = NULL;
[self dealloc];
@throw e;
}
}
return self;
|
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
|
{
if (destructor != NULL)
destructor(self);
of_tlskey_free(key);
@synchronized (tlskeys) {
[tlskeys remove: listobj];
}
[super dealloc];
}
@end
@implementation OFMutex
|
>
>
|
|
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
|
{
if (destructor != NULL)
destructor(self);
of_tlskey_free(key);
@synchronized (tlskeys) {
/* In case we called [self dealloc] in init */
if (listobj != NULL)
[tlskeys remove: listobj];
}
[super dealloc];
}
@end
@implementation OFMutex
|