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 09-02-2010, 09:50 PM   #1 (permalink)
Registered Member
 
Join Date: Sep 2010
Location: Derby United Kingdom
Posts: 16
K Awan is on a distinguished road
Default Memory leakage of xml code

Hi my application works fine but when i checked on leaks it show some leakage which i cant understand i am noob so struggling with memory management following is code:


NSString *urlStr = [NSString stringWithFormat:@"http://webservices.xxx.com?clubid=%@",cid];


NSURL *url = [[NSURL alloc] initWithString:urlStr];
NSXMLParser *xmlParser = [[NSXMLParser alloc] initWithContentsOfURL:url]; // Here is memory leakage 512 bytes responsible //frame allocateCollectableUnscanedstorage
[url release];
woDataController *parser = [[woDataController alloc] initXMLPars];

//Set delegate
[xmlParser setDelegatearser];

[xmlParser parse];
[xmlParser release];
[parser release];

I am following this tutorial
http://www.iphonesdkarticles.com/2008/11/parsing-xml-files.html
K Awan is offline   Reply With Quote
Old 09-04-2010, 08:58 PM   #2 (permalink)
Registered Member
 
Join Date: Sep 2010
Location: Derby United Kingdom
Posts: 16
K Awan is on a distinguished road
Default

Quote:
Originally Posted by K Awan View Post
Hi my application works fine but when i checked on leaks it show some leakage which i cant understand i am noob so struggling with memory management following is code:


NSString *urlStr = [NSString stringWithFormat:@"http://webservices.xxx.com?clubid=%@",cid];


NSURL *url = [[NSURL alloc] initWithString:urlStr];
NSXMLParser *xmlParser = [[NSXMLParser alloc] initWithContentsOfURL:url]; // Here is memory leakage 512 bytes responsible //frame allocateCollectableUnscanedstorage
[url release];
woDataController *parser = [[woDataController alloc] initXMLPars];

//Set delegate
[xmlParser setDelegatearser];

[xmlParser parse];
[xmlParser release];
[parser release];

I am following this tutorial
http://www.iphonesdkarticles.com/2008/11/parsing-xml-files.html
HI all this memory leakage is due to NSXMLParser bug do any one knows how to solve this??? i found some discussion on LEE Armstrong thread
http://stackoverflow.com/questions/1598928/nsxmlparser-leaking
Please help me out i am struggling since last two days Is this bug fixed by apple or not? i am noob.
K Awan is offline   Reply With Quote
Reply

Bookmarks

Tags
leaks problem, xml leak problem

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: 331
9 members and 322 guests
flamingliquid, ilmman, iram91419, linkmx, nadav@webtview.com, Objective Zero, Paul Slocum, stanny, v1n2e7t
Most users ever online was 1,387, 04-10-2012 at 04:21 AM.
» Stats
Members: 175,656
Threads: 94,116
Posts: 402,889
Top Poster: BrianSlick (7,990)
Welcome to our newest member, iram91419
Powered by vBadvanced CMPS v3.1.0

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