C++ Disposing Textures
Yes, I think it is fine. erase() will get rid of the &lt;key,value&gt; pair indexed by the id.

A tiny optimization here would be calling erase() with the iterator it instead of the id string. This should avoid a second lookup, since the iterator already contains the relevant information map need to remove the item. You can see here that erase() operates on keys or iterators.

Also, pass your id string by const reference, since the method does not need a copy of the string. E.g.:

void TextureManager::freeTexture(const std::string &amp; id) { /* ... */ }
                                 ^^^^^             ^


This is a very long and error prone line:


std::map&lt;std::string, SDL_Texture*&gt;::iterator



You should typedef the map type or use auto if targeting C++11.

Typedefing map somewhere:

// In the header file somewhere...
typedef std::map&lt;std::string, SDL_Texture*&gt; TextureMap;

// Then it is a little simpler to use:
TextureMap::iterator it = map.find(...);


Or just use auto if you can:

auto it = map.find(...);