Im trying to create a new subsystem:
class Keybinds: public Object
{
URHO3D_OBJECT(Keybinds, Object)
//...
private:
HashMap<StringHash, Vector<int>> m_keybinds;
HashMap<StringHash, bool> m_actionPressed;
}
and register it with
context_->RegisterSubsystem(new Keybinds(context_));
in the Start() function of the application
but when i call
engine_->Exit();
to close the application then the application crashes in the destructor of the HashMaps i defined in the SubSystem:
~HashMap()
{
Clear();
FreeNode(Tail());
AllocatorUninitialize(allocator_);
delete[] ptrs_; // <-- Here !
}
i tried multiple things but i dont know what is happening!
Can someone help me out?
compiled with Visual Studio 2017, Debug x64 Urho3D Shared
After the application crahses i get this message:
HEAP[Minecraft Clone.exe]: Invalid address specified to RtlValidateHeap( 000002796A5C0000, 00000279714FE140 )
Minecraft Clone.exe hat einen Haltepunkt ausgelöst.
EDIT: Wow i tried to run it in the Release build and it seems that it doenst crash anmyore, so why does it happen only in the debug build ?!