Clang静态分析仪对autoreleased发出警告
结果= [结果stringByReplacingOccurrencesOfString:@“ç”withString:@“c”];
结果= [结果stringByReplacingOccurrencesOfString:@“Ç”“withString:@”c“];
铛静态分析器给出警告“方法返回一个+0保留计数(非拥有引用)的Objective-C对象”
返回[结果autorelease];
“Object autoreleased:object was sent -autorelease but the object has zero(local visible)retain counts”
你对这个警告有什么想法吗?
stringByReplacingOccurrencesOfString返回已经自动释放的对象。
您不需要发布或自动释放它。
链接地址: http://www.djcxy.com/p/43727.html