I am writing an isometric terrain gen engine in sfml and c++ and currently within my chunk management class have my chunks defined as
std::map<std::pair<int,int>, Chunk> chunks;
But I was thinking that declaring the chunk as std::unique_ptr<Chunk> would be smarter since chunks go in and out of scope. Would this be the case or would it be better to continue implementing with just Chunk? Right now the chunks get erased and added to the map based on the player position, so they go in and out of scope very often.
1