0 01.vipin macrumors newbie Original poster Feb 22, 2011 16 0 Mar 8, 2011 #1 I have about 30kb of leak in my RSS reader App.Please sugest some tuts or tips for contolling leak.
KnightWRX macrumors Pentium Jan 28, 2009 15,046 4 Quebec, Canada Mar 8, 2011 #2 Make sure to release any objects you alloc when you're done using them. Not much else to answer unless you provide details/code.
Make sure to release any objects you alloc when you're done using them. Not much else to answer unless you provide details/code.
0 01.vipin macrumors newbie Original poster Feb 22, 2011 16 0 Mar 8, 2011 #3 Code: NSXMLParser *parser = [[NSXMLParser alloc] initWithContentsOfURL:url]; [parser setDelegate:self]; items = [[NSMutableArray alloc] init]; [parser parse]; <---------------- LEAK HERE!!! [parser setDelegate:nil]; Last edited by a moderator: Mar 9, 2011
Code: NSXMLParser *parser = [[NSXMLParser alloc] initWithContentsOfURL:url]; [parser setDelegate:self]; items = [[NSMutableArray alloc] init]; [parser parse]; <---------------- LEAK HERE!!! [parser setDelegate:nil];
nickculbertson macrumors regular Nov 19, 2010 226 0 Nashville, TN Mar 8, 2011 #4 You didn't release anything. [parser release];
0 01.vipin macrumors newbie Original poster Feb 22, 2011 16 0 Mar 8, 2011 #5 Code: NSXMLParser *parser = [[NSXMLParser alloc] initWithContentsOfURL:url]; [parser setDelegate:self]; items = [[NSMutableArray alloc] init]; [parser parse]; [parser release]; return self; I used this but still it leaks. Th leak is upto 24 kb Last edited by a moderator: Mar 9, 2011
Code: NSXMLParser *parser = [[NSXMLParser alloc] initWithContentsOfURL:url]; [parser setDelegate:self]; items = [[NSMutableArray alloc] init]; [parser parse]; [parser release]; return self; I used this but still it leaks. Th leak is upto 24 kb
PhoneyDeveloper macrumors 68040 Sep 2, 2008 3,114 93 Mar 9, 2011 #6 What is the type of the memory blocks that leak? The line of code indicated by the leaks tool is the line where the leaked block is created, not the line where it leaked. The leaks tool doesn't know where the leak occurs.
What is the type of the memory blocks that leak? The line of code indicated by the leaks tool is the line where the leaked block is created, not the line where it leaked. The leaks tool doesn't know where the leak occurs.