Index: src/OFAutoreleasePool.m ================================================================== --- src/OFAutoreleasePool.m +++ src/OFAutoreleasePool.m @@ -49,20 +49,22 @@ [(OFList*)list release]; } #endif @implementation OFAutoreleasePool -+ (void)initialize ++ initialize { #ifndef _WIN32 if (pthread_key_create(&pool_list_key, release_list)) @throw [OFInitializationFailedException newWithClass: self]; #else /* FIXME: Free stuff when thread is terminated! */ if ((pool_list_key = TlsAlloc()) == TLS_OUT_OF_INDEXES) @throw [OFInitializationFailedException newWithClass: self]; #endif + + return self; } + (void)addToPool: (OFObject*)obj { OFList *pool_list = get_tls(pool_list_key); Index: src/OFTCPSocket.m ================================================================== --- src/OFTCPSocket.m +++ src/OFTCPSocket.m @@ -29,16 +29,18 @@ { return [[[OFTCPSocket alloc] init] autorelease]; } #ifdef _WIN32 -+ (void)initialize ++ initialize { WSADATA wsa; if (WSAStartup(MAKEWORD(2, 0), &wsa)) @throw [OFInitializationFailedException newWithClass: self]; + + return self; } #endif - init {