M
Majuer
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!
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!