• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Error on deleting pointer
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Error on deleting pointer


  • Subject: Re: Error on deleting pointer
  • From: Jens Alfke <email@hidden>
  • Date: Sat, 10 Sep 2011 13:23:02 -0700

On Sep 10, 2011, at 7:37 AM, Jos Timanta Tarigan wrote:

> GuardMalloc[FighterTD-23087]: guard malloc zone failure: freeing a pointer we didn't allocate that was not claimed by any registered zone
> GuardMalloc[FighterTD-23087]: Explicitly trapping into debugger!!!
>
> the error occurs when I try to delete a pointer (which is treated as an array).

It’s not a valid pointer, then. The message is simply telling you that the address passed to free() doesn’t correspond to any existing malloc()ed block. The pointer might be to an already-freed block, or the pointer value might be garbage. This is a typical kind of bug when writing C/C++ level code, nothing OS X specific at all.

Since you say you’re deleting an array, make sure you understand the difference between “delete x” and “delete [] x”, and check that you’re using the correct one.

—Jens _______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: Error on deleting pointer
      • From: Jos Timanta Tarigan <email@hidden>
References: 
 >Error on deleting pointer (From: Jos Timanta Tarigan <email@hidden>)

  • Prev by Date: Re: Automatically adding new files to the project
  • Next by Date: Re: Block variable syntax related question
  • Previous by thread: Re: Error on deleting pointer
  • Next by thread: Re: Error on deleting pointer
  • Index(es):
    • Date
    • Thread