@@ -356,26 +356,10 @@ [object release]; [returnValue release]; [super dealloc]; } - -- (void)finalize -{ - if (running == OF_THREAD_RUNNING) - @throw [OFThreadStillRunningException newWithClass: isa - thread: self]; - - /* - * We should not be running anymore, but call detach in order to free - * the resources. - */ - if (running == OF_THREAD_WAITING_FOR_JOIN) - of_thread_detach(thread); - - [super finalize]; -} @end @implementation OFTLSKey + (void)initialize { @@ -454,28 +438,10 @@ } } [super dealloc]; } - -- (void)finalize -{ - if (destructor != NULL) - destructor(self); - - if (initialized) - of_tlskey_free(key); - - /* In case we called [self release] in init */ - if (listObject != NULL) { - @synchronized (TLSKeys) { - [TLSKeys removeListObject: listObject]; - } - } - - [super finalize]; -} @end @implementation OFMutex + mutex { @@ -523,20 +489,10 @@ @throw [OFMutexStillLockedException newWithClass: isa mutex: self]; [super dealloc]; } - -- (void)finalize -{ - if (initialized) - if (!of_mutex_free(&mutex)) - @throw [OFMutexStillLockedException newWithClass: isa - mutex: self]; - - [super finalize]; -} @end @implementation OFCondition + condition { @@ -587,17 +543,6 @@ newWithClass: isa condition: self]; [super dealloc]; } - -- (void)finalize -{ - if (conditionInitialized) - if (!of_condition_free(&condition)) - @throw [OFConditionStillWaitingException - newWithClass: isa - condition: self]; - - [super finalize]; -} @end