开发者

NSOperation and the Autorelease pool

I created an NSOperation. Do I also need to create an autorelease pool for this or is it all handled 开发者_如何学编程for me like voodoo black magic?


The NSOperation may run on any thread, so yes, you must set up your own autorelease pool for the work being done.


You do need to create autorelease pool yourself in the NSOperation main method, if the environment doesn't support automatic garbage collection.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜