开发者

NSOperation and the Autorelease pool

开发者 https://www.devze.com 2022-12-15 13:12 出处:网络
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 m

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

精彩评论

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