• 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
cocoa app using external c++ code
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

cocoa app using external c++ code


  • Subject: cocoa app using external c++ code
  • From: Paul Forgey <email@hidden>
  • Date: Fri, 31 Mar 2006 23:35:29 -0800

I have a cocoa app written using objc++ using external c++ code. Any external classes allocated via new crash the heap if I delete them. If I enable Guard Malloc I get this message:

GuardMalloc[Administration Console-1883]: Tried to free pointer at 0xb161d6cc which is not currently a pointer to a malloc buffer.
GuardMalloc[Administration Console-1883]: Explicitly trapping into debugger!!!


Which pretty much agrees with what malloc_printf complains about with it turned off. I know for a fact I am not disturbing the state of the heap, as I can cause this to happen first thing in main before running any actual code:

// main.mm

int main (int argc, char *argv[])
{
  Otherclass *x = new Otherclass ();
  delete x; // CRASH
  ..
}

What's going on?? I can't find any compiler options XCode is setting that would disturb alignment or anything. In fact my working C++ command line programs all see the same sizes and layouts the cocoa app does.


Attachment: smime.p7s
Description: S/MIME cryptographic signature

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

This email sent to email@hidden

  • Prev by Date: Re: Help in 2 Diamensional Array
  • Next by Date: Re: finding substring
  • Previous by thread: vImage crop?
  • Index(es):
    • Date
    • Thread