开发者

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜