iphone - Memory Leak according to Instruments -


I had to run the appliance on my app saying that I have 864bytes & amp; 2 is the 624bytes foundation from the NSCFString and the responsible library.

So I believe that it does not cause leakage by me? Or what is this?

According to the tool it looks like there are abusive ways

  substringWithRange  

This is leak.

  - (zero) loadDeckData {deckArray = [[NSMutableArray alloc] init]; NSString * path = [[NSBundle mainBundle] pathForResource: @ "Rugby" type: @ "txt" in directory: @ ""]; NSString * Data = [NSString stringWithContentsOfFile: Path Encoding: NSUTF8StringEncoding Error: NULL]; NSString * newString = @ ""; NSString * newline = @ "\ n"; NSSTING * COMMA = @ ","; Int commaCount = 0; Int class = 0; NSString * nameHolder = @ ""; NSString * infoHolder = @ ""; NSMutableArray * statsHolder = [[NSMutableArray alloc] init]; For (int i = 0; i & lt; data. Lamps; i ++) {newString = [data subchiningwirerange: nsmkrange (i, 1)]; If (if our first comma is) if we search for a comma, then // if we know the first comma, then we have named NAME {nameHolder = [data substrings with-range: nsmkrange (i-rankcount, rangeCount)]; } And if (commount == 1) // {infoholder = [data substringswindernand: nsmkrange (i-rangecount, rangecount)]; // NSLog (infoHolder); } Other // If we are on the second, third, NAM, then we are parsing the statistics {nsitigar value = [[data substringivrrange: nsmkrange (i-rangecount, rangecount)] integer value ;; NSN * Boxed Value = [NSNumber Number with Integer: The Value]; [Statisticsadder addObject: boxedview]; } Category = 0; CommaCount ++; } And if ((newstring isqualToString: newline)) {NSInteger theValue = [[Data SubstringwandRange: NsmKrange (I-Rangecount, RangeCount)] Integer value ;; NSN * Boxed Value = [NSNumber Number with Integer: The Value]; [Statisticsadder addObject: boxedview]; CommaCount = 0; RangeCount = 0; Card * myCard = [[card allot] init]; MyCard.name = nameHolder; MyCard.information = infoHolder; (Int x = 0; x & lt; [statsHolder count]; x ++) {[mycard.statsArray addObject: [statsHolder objectAtIndex: x]]; } [Deckair ad object: Maicard]; [Mikeard Autorex]; [Statistics all player extracted]; } Else {rangeCount ++; }} [Statistics Holder Autorquez]; }  

Thanks for your advice - Code

As Gary's comments show that it is very difficult to diagnose on the basis of your question.

It is almost certainly a leakage generated by you, but I am scared.

If you go to the View menu, then you can open extended extension . This should allow you to properly see a stack trace where the leak occurred. Should help to diagnose this problem


Comments