Re: cocoa app using external c++ code
Re: cocoa app using external c++ code
- Subject: Re: cocoa app using external c++ code
- From: John Stiles <email@hidden>
- Date: Sat, 01 Apr 2006 08:10:56 -0800
What does the destructor of Otherclass do?
Paul Forgey wrote:
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.
------------------------------------------------------------------------
_______________________________________________
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
_______________________________________________
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