您是否需要在Objective-C中释放方法的参数? [英] Do you need to release parameters of methods at the end of them in Objective-C?
本文介绍了您是否需要在Objective-C中释放方法的参数?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如果将参数传递给方法,是否需要在方法末尾释放该参数?
If I have a parameter passed to a method, do I need to release the parameter at the end of the method?
推荐答案
否.考虑 NARC :新Alloc保留副本".如果您没有做任何这些事情,则无需释放.
No. Think NARC: "New Alloc Retain Copy". If you are not doing any of those things, you don't need to release.
这篇关于您是否需要在Objective-C中释放方法的参数?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文