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

Mockup & CodeGen, iPhone & iPad
($9.99)

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

Manu
($0.99)

Want your application or service advertised on iPhone Dev SDK?

Go Back   iPhone Dev SDK Forum

View Single Post
Old 11-06-2009, 11:32 AM   #3 (permalink)
krish
krishnan
 
krish's Avatar
 
Join Date: Sep 2009
Location: Chennai
Posts: 38
Send a message via Yahoo to krish
Default Help

Quote:
Originally Posted by krille View Post
I fixed the problem myself. It is nothing wrong with the TouchXML Code - it was kind of stupid, but maybe someone might come across the same thing, so I am going to post it here.

1) I had a mutable array set up as instance variables like this:

Code:
    @interface XMLParser : NSObject {

    // ...  
    NSMutableArray *mobil;  
    // ...  
    }   
    @property(nonatomic, retain) NSMutableArray *mobil;  
    @end
Everytime I wanted to reset and store new data inside the array I did:
Code:
self.mobil = nil;
Which did not what I wanted to do, so this is the better approach:
Code:
[self.mobil removeAllObjects];
2) The dealloc method has to be like this to fix the leaks (because mobil is defined as a property):
Code:
    -(void)dealloc {  
      [mobil release];  
      self.mobil = nil;  
  }
Whew, that has been a lot of work to find out - hope it saves someone else some time :-)


Hi Friend,

I am going through a similar problem. I am also using a custom parser to parse incoming data. But when I check it through Leaks tool, I find the most of the objects I use are leaking. Pleas could you help me?.
krish is offline   Reply With Quote
 

» Advertisements
» Stats
Members: 158,744
Threads: 89,199
Posts: 380,558
Top Poster: BrianSlick (7,129)
Welcome to our newest member, Dani77
Powered by vBadvanced CMPS v3.1.0

All times are GMT -5. The time now is 04:48 PM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.