Index: src/OFDictionary.m ================================================================== --- src/OFDictionary.m +++ src/OFDictionary.m @@ -106,11 +106,11 @@ @throw [OFInvalidArgumentException newWithClass: isa]; hash = [key hash] & (size - 1); if (data[hash] == nil) - data[hash] = [OFList new]; + data[hash] = [[OFList alloc] init]; for (iter = [data[hash] first]; iter != NULL; iter = iter->next->next) { if ([iter->object isEqual: key]) { [iter->next->object release]; [obj retain]; Index: src/OFObject.h ================================================================== --- src/OFObject.h +++ src/OFObject.h @@ -41,15 +41,10 @@ * * \return The allocated object. */ + alloc; -/** - * Allocated memory for an instance of the class and initializes the instance. - */ -+ new; - /** * \return The class pointer */ + (Class)class; Index: src/OFObject.m ================================================================== --- src/OFObject.m +++ src/OFObject.m @@ -69,15 +69,10 @@ instance->isa = self; return instance; } -+ new -{ - return [[self alloc] init]; -} - + (Class)class { return self; } Index: src/OFTCPSocket.h ================================================================== --- src/OFTCPSocket.h +++ src/OFTCPSocket.h @@ -91,12 +91,11 @@ */ - listen; /** * Accept an incoming connection. - * \return An OFTCPSocket for the accepted connection, which is NOT - * autoreleased! + * \return An autoreleased OFTCPSocket for the accepted connection. */ - (OFTCPSocket*)accept; /** * Enables/disables non-blocking I/O. Index: src/OFTCPSocket.m ================================================================== --- src/OFTCPSocket.m +++ src/OFTCPSocket.m @@ -182,11 +182,11 @@ OFTCPSocket *newsock; struct sockaddr *addr; socklen_t addrlen; int s; - newsock = [OFTCPSocket new]; + newsock = [OFTCPSocket tcpSocket]; addrlen = sizeof(struct sockaddr); @try { addr = [newsock allocWithSize: sizeof(struct sockaddr)]; } @catch (OFException *e) { Index: tests/OFArray/OFArray.m ================================================================== --- tests/OFArray/OFArray.m +++ tests/OFArray/OFArray.m @@ -125,11 +125,11 @@ TEST(OFArray) puts("== TESTING OFBigArray =="); TEST(OFBigArray) - pool = [OFAutoreleasePool new]; + pool = [[OFAutoreleasePool alloc] init]; x = [OFArray arrayWithItemSize: 1]; y = [OFArray bigArrayWithItemSize: 1]; if (![x isEqual: y]) { puts("FAIL 1!"); Index: tests/OFAutoreleasePool/OFAutoreleasePool.m ================================================================== --- tests/OFAutoreleasePool/OFAutoreleasePool.m +++ tests/OFAutoreleasePool/OFAutoreleasePool.m @@ -84,23 +84,23 @@ withMethodFromClass: [TestObject class]]; OFObject *o1, *o2, *o3; OFAutoreleasePool *pool1, *pool2; - o1 = [[OFObject new] autorelease]; + o1 = [[[OFObject alloc] init] autorelease]; - pool1 = [OFAutoreleasePool new]; - o2 = [[OFObject new] autorelease]; + pool1 = [[OFAutoreleasePool alloc] init]; + o2 = [[[OFObject alloc] init] autorelease]; [pool1 releaseObjects]; - o2 = [[OFObject new] autorelease]; + o2 = [[[OFObject alloc] init] autorelease]; - pool2 = [OFAutoreleasePool new]; - o3 = [[OFObject new] autorelease]; + pool2 = [[OFAutoreleasePool alloc] init]; + o3 = [[[OFObject alloc] init] autorelease]; [pool1 retain]; [pool1 release]; [pool1 release]; [o3 free]; return (inits == 12 && retains == 1 && releases == 6 ? 0 : 1); } Index: tests/OFDictionary/OFDictionary.m ================================================================== --- tests/OFDictionary/OFDictionary.m +++ tests/OFDictionary/OFDictionary.m @@ -27,11 +27,11 @@ BOOL caught; OFDictionary *dict = [OFDictionary dictionaryWithHashSize: 16]; OFIterator *iter = [dict iterator]; - OFAutoreleasePool *pool = [OFAutoreleasePool new]; + OFAutoreleasePool *pool = [[OFAutoreleasePool alloc] init]; OFString *key1 = [OFString stringWithCString: "key1"]; OFString *key2 = [OFString stringWithCString: "key2"]; OFString *value1 = [OFString stringWithCString: "value1"]; OFString *value2 = [OFString stringWithCString: "value2"]; Index: tests/OFObject/OFObject.m ================================================================== --- tests/OFObject/OFObject.m +++ tests/OFObject/OFObject.m @@ -31,11 +31,11 @@ } int main() { - OFObject *obj = [OFObject new]; + OFObject *obj = [[OFObject alloc] init]; void *p, *q, *r; /* Test freeing memory not allocated by obj */ puts("Freeing memory not allocated by object (should throw an " "exception)..."); Index: tests/OFPlugin/TestPlugin/TestPlugin.m ================================================================== --- tests/OFPlugin/TestPlugin/TestPlugin.m +++ tests/OFPlugin/TestPlugin/TestPlugin.m @@ -19,7 +19,7 @@ @end id init_plugin() { - return [TestPlugin new]; + return [[TestPlugin alloc] init]; } Index: tests/OFString/OFString.m ================================================================== --- tests/OFString/OFString.m +++ tests/OFString/OFString.m @@ -52,20 +52,20 @@ int main() { size_t i = 0; - OFAutoreleasePool *pool = [OFAutoreleasePool new]; + OFAutoreleasePool *pool = [[OFAutoreleasePool alloc] init]; OFString *s1 = [OFString stringWithCString: "test"]; OFString *s2 = [OFString stringWithCString: ""]; OFString *s3; OFString *s4 = [OFString string]; s3 = [s1 copy]; CHECK([s1 isEqual: s3]) - CHECK(![s1 isEqual: [OFObject new]]) + CHECK(![s1 isEqual: [[OFObject alloc] init]]) CHECK([s1 hash] == [s3 hash]) [s2 appendCString: "123"]; [s4 setTo: [s2 cString]];