@@ -24,11 +24,11 @@ static OFString *module = @"OFTCPSocket"; @implementation TestsAppDelegate (OFTCPSocketTests) - (void)TCPSocketTests { - OFAutoreleasePool *pool = [[OFAutoreleasePool alloc] init]; + void *pool = objc_autoreleasePoolPush(); OFTCPSocket *server, *client = nil, *accepted; uint16_t port; char buf[6]; TEST(@"+[socket]", (server = [OFTCPSocket socket]) && @@ -54,8 +54,8 @@ TEST(@"-[readIntoBuffer:length:]", [accepted readIntoBuffer: buf length: 6] && !memcmp(buf, "Hello!", 6)) - [pool drain]; + objc_autoreleasePoolPop(pool); } @end