Iteration

you can safely remove entries while iterating a TMap IF you use a iterator thanks to Daekesh

for (auto It = YourMap.CreateIterator(); It; ++It)
{ 
	It.RemoveCurrent();
}

Add memory

When you add a key and value to a TMap, it gets copied to its own memory, meaning whatever was passed will get destroyed (destructor called).

See Move semantics (&&)