Why GuardMalloc doesn't report memory leak?

Discussion in 'iPhone/iPad Programming' started by mikezang, Aug 21, 2010.

  1. macrumors 6502a

    Here is my dealloc in my view controller, even if I comment some release, GuardMalloc doesn't report any memory leak, why?
    - (void)dealloc {
        [popoverController release];
        [toolbar release];
        [detailItem release];
        //[detailDescriptionLabel release];
        [super dealloc];
  2. macrumors 603


    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:

  3. macrumors 6502a

    Thanks for your easier explanation.

Share This Page