开发者

iPhone Leak while reading string value

开发者 https://www.devze.com 2023-04-06 09:41 出处:网络
Instruments tools says this is a leak, any ideas? I release the variable object by end of the for loop

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

精彩评论

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