Well, storing pointers to vector elements (in our case actually map elements) can indeed be hazardous as changes to the container can cause reallocations. However, storing pointers in a vector or map is perfectly safe. They're just integers, after all. The only way for it to go wrong is if something else tampers with the data stored at the address which the pointer points to. This is a very common problem. Using image data as a specific case, most of the time it is code (client code, asset manager, etc.) that deletes (frees) the image data and does not ensure that references to that data (i.e. the map) are cleaned up. Autopointers are often a good solution. I don't know how Shiva3D manages images/textures. Other times, memory errors (double frees, array overruns, mismatched struct definitions, etc.) can mess with the pointer value and then all bets are off. If you can set up a Linux development environment, I highly recommend using Valgrind for catching those memory errors in any code you write.