内存管理-黄金法则
The basic rule to apply is everything that increases the reference counter with alloc, [mutable]copy[withZone:] or retain is in charge of the corresponding [auto]release.
如果对一个对象使用了alloc、[mutable]copy、retain,那么你必须使用相应的release或者autorelease。
这方面问题写的人比较多,找了一个非常详细的http://www.cnblogs.com/kenshincui/p/3870325.html
iOS开发系列—内存管理
最新推荐文章于 2024-10-01 19:42:26 发布