Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

01.vipin

macrumors newbie
Original poster
Feb 22, 2011
16
0
I have about 30kb of leak in my RSS reader App.Please sugest some tuts or tips for contolling leak.
 
Make sure to release any objects you alloc when you're done using them. Not much else to answer unless you provide details/code.
 
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:
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:
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.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.