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 06-20-2009, 11:50 AM   #2 (permalink)
krille
New Member
 
Join Date: Jun 2009
Posts: 2
Lightbulb

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 :-)
krille is offline   Reply With Quote
 

» Advertisements
» Online Users: 746
17 members and 729 guests
ADY, AppleSteve, betterlee, blueskysinger, ckgni, Domele, femenina, hasinthajanaka, ilmman, jkigel, JohniARivera, NoGameJoe, prerna chavan, sacha1996, saqibjaan, zamoraalex2696, zom888
Most users ever online was 1,187, 10-11-2011 at 08:09 AM.
» Stats
Members: 158,620
Threads: 89,141
Posts: 380,328
Top Poster: BrianSlick (7,110)
Welcome to our newest member, NoGameJoe
Powered by vBadvanced CMPS v3.1.0

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