开发者

memory leak in nsarray

can any one please tell me whats causing the memory leak.

memory leak in nsarray

Data_Parser is an NSObject class. This clas开发者_高级运维s parses xml file and the values are stored in a NSMutableArray tList.

Thanks


You're allocating a mutable array in line 46 and assigning it to ar:

NSMutableArray * ar = [[NSMutableArray alloc] init];

and then in line 48 you're assigning something else to ar. That loses the original array you allocated, which you never use or release. (The code doesn't leak if the for loop doesn't run due to en empty parser list, but the analyzer is showing you where it will.)

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜