low level approaches tend not to be portable
for example that -1 think was changed after weaaddar's suggestion it used not to be like that
if a better allocator is used later then your map might break if you use it directly.
Also: This is good to know if something was destroyed, but if something else was later created your code would get confused.
I think a better way would be not destroying the object, instead using a flag, and then destroy it.
this is mostly like doing a pseudo reference counter... |