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

Thread: Memory Leaks..!
View Single Post
Old 07-02-2009, 04:49 PM   #5 (permalink)
smasher
Senior Member
iPhone Dev SDK Supporter
 
smasher's Avatar
 
Join Date: Jul 2008
Location: San Mateo, CA (San Fran)
Posts: 3,858
Default

Perfect. The trace shows you where these objects were created, which is great. I suspect that the real problem is with the "Provider" class - it probably retains these strings (or puts them in "retain" properties) and never releases them.

Does the "Provider" class have a dealloc method? It probably should, and it should look something like this:

Code:
- (void)dealloc {
    [name release];
    [lastname release];

     self.city=nil;  //this is the same as [city release] if city is a "retain" property.

	[super dealloc];
}
That way, all of the objects retained by the provider can b released when the provider is deallocated. That [super dealloc] is one of the few times that you call dealloc yourself instead of just release.
__________________

Free Games!
smasher is offline   Reply With Quote
 

» Advertisements
» Stats
Members: 158,829
Threads: 89,207
Posts: 380,639
Top Poster: BrianSlick (7,129)
Welcome to our newest member, OrvalCarrio
Powered by vBadvanced CMPS v3.1.0

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