Code: Select all
if (!ReferenceCounter)
{
delete this;
return true;
}
Windows has triggered a breakpoint in MyProgram.exe.
This may be due to a corruption of the heap, which indicates a bug in MyProgram.exe or any of the DLLs it has loaded.
This may also be due to the user pressing F12 while MyProgram.exe has focus.
The output window may have more diagnostic information.
The output window has this content:
First-chance exception at 0x7c97d801 in MyProgram.exe: 0xC0000005: Access violation reading location 0x014a9070.
HEAP[MyProgram.exe]: Invalid Address specified to RtlFreeHeap( 00A00000, 02470040 )
Windows has triggered a breakpoint in MyProgram.exe.
This may be due to a corruption of the heap, which indicates a bug in MyProgram.exe or any of the DLLs it has loaded.
This may also be due to the user pressing F12 while MyProgram.exe has focus.
The output window may have more diagnostic information.
The program '[2112] MyProgram.exe: Native' has exited with code 0 (0x0).
Can someone help? I don't know why the deletion fails.
The this-Pointer of IrrlichtDevice is valid before the deletion but something seems to be broken.