@@ -35,11 +35,12 @@ static OFMutableDictionary OF_GENERIC(OFString *, OFURLHandler *) *handlers; #ifdef OF_HAVE_THREADS static OFMutex *mutex; -OF_DESTRUCTOR() +void +releaseMutex(void) { [mutex release]; } #endif @@ -52,10 +53,11 @@ return; handlers = [[OFMutableDictionary alloc] init]; #ifdef OF_HAVE_THREADS mutex = [[OFMutex alloc] init]; + atexit(releaseMutex); #endif #ifdef OF_HAVE_FILES [self registerClass: [OFFileURLHandler class] forScheme: @"file"];