Advertise here




Advertise here

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Sign In with Google Sign In with OpenID
Please do not post the same thing multiple times. The board software automatically flags certain posts as needing moderator attention. This happens the most often for new users. I'm pretty sure this is made clear at the time you attempt to post. Posting the same thing over and over again just makes that many more posts the moderators have to weed through later. This makes us sad. Don't make us sad. If your post/thread doesn't appear, just wait a while. Don't post it again. If it hasn't shown up by the next day, then you can try again. I normally go through posts in the mornings, and try to check a few times throughout the day, but I'm not here 24/7. There will typically be a significant delay before posts are approved. Just be patient.

Memory Leak NSXMLController and others (as a result of the Parser leak)

Hey Folks, just another issue, maybe you have another run on this one: solving one leak brings another one:



xmlcontroller.m

NSString *theContent = [currentNodeContent stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceAndNewlineCharacterSet]]; //<-- 100% Memory Leak
[currentNodeContent setString:@\"\"];

if([elementName isEqualToString:@\"pos\"])
{
currentTabelle.place = theContent;
}
... .... .....

if([elementName isEqualToString:@\"team\"])
{
[table addObject:currentTabelle];
[currentTabelle release];
currentTabelle = nil;
[currentNodeContent release];
currentNodeContent = nil;
}


This just happens whenever the view disappears (i.e. tabbar) and another view gets loaded (with another XMLController) the view which throws a leak is the one that displays the content of the feed of the xmlparser.

tableview.m

self.xmlcont = [[[XMLController alloc] init] autorelease];

if ([content isEqualToString:@\"1. Bundesliga\"]){
if(pageNumber == 0){
[xmlcont loadXMLbyURL:@\"http://results.baseball-softball.de/extern/standing.php?l=12&xml\"];
}
if(pageNumber == 1){
[xmlcont loadXMLbyURL:@\"http://results.baseball-softball.de/extern/standing.php?l=11&xml\"];
}
... .... .....

}

The View (aboth (tableview)) gets added by a scrollview, in reaction of another leak displayed in this scrollview, i think this is a chain-reaction.

Scrollview.m:

if (nil == controller.view.superview) { //<- 100% Leak
CGRect frame = scrollView.frame;
frame.origin.x = frame.size.width * page;
frame.origin.y = 0;
controller.view.frame = frame;
[scrollView addSubview:controller.view];
}


I hope you can help me this time as good as the last time ;)!

thanx 2 all
Sign In or Register to comment.