Let's say you have an unordered instance variable map that maps an integer to an object (like a time object). If you are overwriting that map and you use the standard overwrite like map_ = time.now() in a class function, where is that time.now object created? Is it in the stack where the function was and so when the function goes out of scope that time in the map goes out of scope? Or is it with the class objects so you can check that time later?
Basically, if you are writing to an instance field map in one function and you are storing objects you want to access later can you use normal objects or do you need to use pointers?
I haven't used C++ for a while and I'm trying to relearn the nuances and this is really confusing me. Thanks!