仪器工具说这是泄漏,有什么想法吗?
我在for循环结束时释放变量对象
并且通过上面方法的开头,这就是我如何设置变量obkect,那就是自动释放;
NSMutableArray *variables = nil;
if (self.responseXMLData) {
variables = [NSMutableArray arrayWithCapacity:10];
//here is the all the code in the if statement which posted the screen shots
答案 0 :(得分:2)
对所有新读者,在编辑问题之后;这不是答案!
是
您不会在任何地方发布variables
。
您致电alloc] init]
,因此您有责任release
:)
答案 1 :(得分:1)
确保在dealloc(或某处)释放self.variables
属性。另外,请确保您的Variable
类正在variableValues
类的dealloc中发布Variable
属性。
相关问题的答案相同:iPhone Leak on UITextfield text