Advertise Books Events Forum News Social Networking Support Us

sdkIQ for iPhone
($4.99)

Shape Up
($0.99)

Your First iPhone App
($1.99)

iVidCam Free
(free)

Kid Art
($0.99)

iPUBQUIZ
(£1.19)

ArtStudio
($3.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-03-2009, 01:13 PM   #12 (permalink)
_mubashir
Registered Member
 
Join Date: Jun 2009
Posts: 43
Default

Quote:
Originally Posted by smasher View Post
Put a breakpoint or NSLog in Provider's dealloc method; maybe it is never being called. I assume you're releasing arrProvider in your appdelegate's dealloc method? Or is that leaking too?
I have put NSLog in dealloc and it gets called fine. Yes I am releasing arrProvider (NSMutableArray) in the appdelegate's dealloc. I am getting leak on Provider object as well so I assume its leaking. One thing I need to know is I have arrProvider filled with Provider objects, now do I need to release all Provider objects before releasing arrProvider or I can just release it ?

Quote:
Originally Posted by smasher View Post
Also, if you click the gray arrow next to the address of your leaked NSPlaceholderString you can see that "history" of that memory address. Start at the bottom (most recent) and look up until you see malloc. That will be the history of every time that object was malloc'd, retained, and released. Somewhere in there is a retain without a release.
YES its shows malloc, release, malloc and then autorelease. autorelease is not cleaning anything so its becomes a leak.

Quote:
Originally Posted by smasher View Post
PS - I am able to create a similar leak in my own code if I modify ProviderID, LastName, or FirstName directly, without using "provider.blah = blah" or "self.blah = blah". Are you, in any location, changing the variable without using the property?
NO - the object once instantiated never modifies.


I also need to know the View that we push in the navigation controller - do we need to release it too?
I am autoreleasing it like this
Code:
Providers *ProviderView = [[[Providers alloc] CustomInitWithNibName:@"Providers" bundle:nil bIsProvider:YES] autorelease];

    [self.navigationController pushViewController:ProviderView animated:YES];

Thanks for all your help!!

Mubashir
_mubashir is offline   Reply With Quote
 
Enter the iPhone App Challenge!  Win $500!
» Advertisements
» Online Users: 458
30 members and 428 guests
alexy, asimrs, Boh, bugman, dany88, Dmitry, DoBs, Erle, fnicola, gluse, greetings, hatembr, hg4072, ivanraso, joalta, Johanovski, manofham, Meoz, myPhone, nikhil, ovidiu, Salman, sandman4sure, sanjeev, skunk, SteveMobs, thomaswguy, tychop, umop, vikysaran
Most users ever online was 779, 05-11-2009 at 09:55 AM.
» Stats
Members: 24,095
Threads: 38,876
Posts: 170,546
Top Poster: smasher (2,563)
Welcome to our newest member, hg4072
Powered by vBadvanced CMPS v3.1.0

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