Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

mikezang

macrumors 6502a
Original poster
May 22, 2010
854
7
Tokyo, Japan
Here is my dealloc in my view controller, even if I comment some release, GuardMalloc doesn't report any memory leak, why?
Code:
- (void)dealloc {
    [popoverController release];
    [toolbar release];
    
    [detailItem release];
    //[detailDescriptionLabel release];
    [super dealloc];
}
 

Cromulent

macrumors 604
Oct 2, 2006
6,802
1,096
The Land of Hope and Glory
Because GuardMalloc is not a tool to find memory leaks. It is a tool that (for instance) crashes when you try and read data from a previously freed block of memory rather than simply reading arbitrary data from the memory address. It also can be used to determine if you are writing past the end of an allocated block of memory. It will also help identify double frees etc.

Use things like the static analyser and Instruments to help find memory leaks.

Edit: Look here:

http://developer.apple.com/iphone/l...ks.html#//apple_ref/doc/uid/20001883-CJBJFIDD
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.