Advertise Mobile SDKs Books Events Forum News Social Networking Support Us
Follow @iphonedevsdk on Twitter

Interface 2, Advanced iOS
Mockup & Code Gen
($9.99)

Make your own iPhone apps
and run them live!
(free)

Pic Frame Dynamo: Photo Editing
($0.99)

Abiliator
($1.99)

Want your application or service advertised on iPhone Dev SDK?

Go Back   iPhone Dev SDK Forum > iPhone SDK Development Forums > iPhone SDK Development

Reply
 
LinkBack Thread Tools Display Modes
Old 06-22-2011, 06:30 AM   #1 (permalink)
Registered Member
 
Join Date: Jun 2011
Posts: 6
Pretime is on a distinguished road
Lightbulb 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
Code:
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
Code:
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:
Code:
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
Pretime is offline   Reply With Quote
Reply

Bookmarks

Tags
memory leak, nsxmlparser, uiscrollview

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



» Advertisements
» Online Users: 330
8 members and 322 guests
chemistry, Dnnake, iOS.Lover, lendo, leostc, Leslie80, pbart, VinceYuan
Most users ever online was 1,387, 04-10-2012 at 04:21 AM.
» Stats
Members: 175,664
Threads: 94,120
Posts: 402,898
Top Poster: BrianSlick (7,990)
Welcome to our newest member, Leslie80
Powered by vBadvanced CMPS v3.1.0

All times are GMT -5. The time now is 02:27 AM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0