开发者

iPhone Leak while reading string value

Instruments tools says this is a leak, any ideas?

I release the variable object by end of the for loop

iPhone Leak while reading string value

iPhone Leak while reading string value

and by the begininng of the method above this is how I set the variables obkect, thats autorelease;

NSMutableArray *variables = nil; 
if (self.responseXMLData) {
    variables = [NSMutableArray arrayWithCapacity:10];
            //here is the al开发者_如何学运维l the code in the if statement which posted the screen shots


To all the new readers, after the edit to the question; this isn't the answer !


Yes.

You don't release variables anywhere.

You call alloc] init] so it's your responsibility to release it :)


Make sure you are releasing self.variables property in your dealloc (or somewhere). Also, ensure that your Variable class is releasing variableValues property in the Variable class's dealloc.

Same answer from related question: iPhone Leak on UITextfield text

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜