Allocation Conflict Error
From: Majuer (silviashe_at_hotmail.com)
Date: 10/31/03
- Next message: Oplec: "Re: Reassignment to a const variable that was declared in an if()"
- Previous message: Andrey Tarasevich: "Re: Simple Pointer Question"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: 31 Oct 2003 11:41:06 -0800
Hi,
I have a class in one DLL. Something like this:
class CLASS1
{
MyData* pData;
CLASS1()
{
pData = NULL;
}
Load()
{
pData = new MyData;
}
~CLASS1()
{
if (pData)
pData = delete pData;
}
}
Then in another DLL.
I have
CLASS1 myClass;
myClass.Load();
...
For release build, in boundscheker, I got this error message at the
destructor of CLASS1 (pData = delete pData;)
Allocation Conflict: Attempting to call global_operator_delete on
pointer 0x322E5D8, that was allocated by HeapAlloc.
Why the "new" was using HeapAlloc while the "delete" use
"global_operator_delete"(defined in afx.inl)?
Thanks!
- Next message: Oplec: "Re: Reassignment to a const variable that was declared in an if()"
- Previous message: Andrey Tarasevich: "Re: Simple Pointer Question"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|