@@ -51,11 +51,11 @@ id old; @try { old = [self objectForTLSKey: key]; } @catch (OFNotInSetException *e) { - [e free]; + [e dealloc]; old = nil; } #ifndef _WIN32 if (pthread_setspecific(key->key, obj)) @@ -106,11 +106,11 @@ #else if ((thread = CreateThread(NULL, 0, call_main, self, 0, NULL)) == NULL) { #endif c = isa; - [super free]; + [super dealloc]; @throw [OFInitializationFailedException newWithClass: c]; } return self; } @@ -141,11 +141,11 @@ return retval; #endif } -- free +- (void)dealloc { /* * No need to handle errors - if canceling the thread fails, we can't * do anything anyway. Most likely, it finished already or was already * canceled. @@ -157,11 +157,11 @@ TerminateThread(thread, 1); CloseHandle(thread); } #endif - return [super free]; + [super dealloc]; } @end @implementation OFTLSKey + tlsKeyWithDestructor: (void(*)(void*))destructor @@ -180,12 +180,12 @@ if (pthread_key_create(&key, destructor)) { #else if ((key = TlsAlloc()) == TLS_OUT_OF_INDEXES) { #endif c = isa; - [super free]; + [super dealloc]; @throw [OFInitializationFailedException newWithClass: c]; } return self; } @end