开发者

Can I autorelease an instance of NSProxy?

开发者 https://www.devze.com 2022-12-25 01:45 出处:网络
Does NSProxy开发者_如何学Go really implement -autorelease and -release? If not, do I need to manually dealloc NSProxy instances? (Please assume that I am not using GC).

Does NSProxy开发者_如何学Go really implement -autorelease and -release? If not, do I need to manually dealloc NSProxy instances? (Please assume that I am not using GC).

Thanks for clearing this up for me.


Yes, it implements them. NSProxy conforms to the NSObject protocol, which includes retain, release, and autorelease. NSObject is not just a class, it's also a protocol.

@interface NSProxy <NSObject>

and in the NSObject protocol definition:

- (id)retain;
- (oneway void)release;
- (id)autorelease;
0

精彩评论

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