46 minutes ago, Lactose said:
Why are you loading textures manually in one place, but also passing the path in a different (seemingly unrelated) place? Your original post says it's to be able to request the texture again, but why would you ever want that?
I would have expected the tile to only hold a pointer to its texture. Upon creation, load the texture (if need be, have some caching system or similar to prevent multiple loads of the same texture) and store a pointer to the texture in each tile/object.
Because that imply Tile is responsible for freeying up memory, and if that is my pattern, then I have to remember to destroy my textures in every Entity type destructor I create in my game, therefore is the same as using new and deletes because I am bound to forget to destroy a texture, sooner or later.
My setup is that App loads a texture upon request into a map<string,SDL_Texture*> in case the texture wasn't already loaded, so each class constructor actually prompt a texture load the first time a type of class is called if the texture wasn't already loaded (and I can also manually prompt a series of texture load at the beggining of a level if I know I will need them), but App destructor is responsible to free all in a single for range loop.
SDL_Texture* App::GetTexture(std::string texturePath)
{
auto Texture = Textures.find(texturePath);
if (Texture != Textures.end()) {
return Texture->second;
}
else
{
LoadTexture(texturePath);
return Textures[texturePath];
}
}
App::~App()
{
for (auto& T : Textures) {
SDL_DestroyTexture(T.second);
}
if (Window) {
SDL_DestroyWindow(Window);
}
if (Renderer) {
SDL_DestroyRenderer(Renderer);
}
}
Clean, compact and not error prone, imo 
Edit: my bad, seems I am already doing what you're saying @Lactose and I had misunderstood
But still, maybe I want to load a bunch of texture upfront, so I might need to have those paths somewhere else too.