Quote:
Originally Posted by smasher
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
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
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