In
http://gnustep.org/resources/documentation/Developer/Base/ProgrammingManual/manual_4.html#SEC51
it says, for +new, to use...

+ new
{
 Point *point = [[self alloc] init];
   // note "self" refers to the "Point" _class_ object!
 return AUTORELEASE(point);
}

... but NSObject.m says...

+ (id) new
{
 return [[self alloc] init];
}

... which one is right?

NSObject.m is right. +new is supposed to be exactly the same as +alloc followed by -init ... probably a typo in the Base programming manual :-)

Thanks


_______________________________________________
Bug-gnustep mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/bug-gnustep

Reply via email to