【发布时间】:2012-02-20 17:43:54
【问题描述】:
当我分析我的代码时,当我将核心数据字符串属性分配给 UILabel 时,它显示出潜在的泄漏
cell.textLabel.text = prop.new_value;
使用 Instrument and Leaks 运行应用程序不会显示任何问题。
【问题讨论】:
标签: objective-c ios memory-leaks
当我分析我的代码时,当我将核心数据字符串属性分配给 UILabel 时,它显示出潜在的泄漏
cell.textLabel.text = prop.new_value;
使用 Instrument and Leaks 运行应用程序不会显示任何问题。
【问题讨论】:
标签: objective-c ios memory-leaks
静态分析器理解某些 cocoa 约定,例如以“new”开头的方法返回一个保留的对象指针。
我建议将prop.new_value 中的“new_value”更改为不同的内容。
来源:http://clang.llvm.org/docs/AutomaticReferenceCounting.html#objects.operands.retained_returns
【讨论】: