New to c++11 features, proper use of shared_ptr?
问题 So my understanding is that a shared_ptr automatically deallocates from memory when the last remaining owner of the object is destroyed or reassigned, (Seems too good to be true?) and it's useful when many instances may be sharing the same object. Correct? So in my case, I'm making a 2d tiled world, so I'm drawing many of the same texture to the screen. I have std::map<int, shared_ptr<Tile>> Tiledb; to store all the tiles. The idea is to only load the texture in once and then i can render it