开发者

is there an equivalent to [[SomeClass new] autorelease] in objective-C

开发者 https://www.devze.com 2023-03-25 06:51 出处:网络
I know that I could implement as a category on NSObject, but is the开发者_运维知识库re an existing method for:

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

精彩评论

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