is there an equivalent to [[SomeClass new] autorelease] in objective-C
I know that I could implement as a category on NSObject, but is the开发者_运维知识库re an existing method for:
+(id)auto
{
return [[self new]autorelease];
}
Many classes provide convenience methods to do just that:
+ (id)string
is a method of NSString
, for example.
精彩评论