| 93 | } |
| 94 | |
| 95 | void ModelCache::removeModel(const std::string& modelPath) |
| 96 | { |
| 97 | // greebo: Disable the modelcache. During map::clear(), the nodes |
| 98 | // get cleared, which might trigger a loopback to insert(). |
| 99 | _enabled = false; |
| 100 | |
| 101 | ModelMap::iterator found = _modelMap.find(modelPath); |
| 102 | |
| 103 | if (found != _modelMap.end()) |
| 104 | { |
| 105 | _modelMap.erase(found); |
| 106 | } |
| 107 | |
| 108 | // Allow usage of the modelnodemap again. |
| 109 | _enabled = true; |
| 110 | } |
| 111 | |
| 112 | void ModelCache::clear() |
| 113 | { |
no test coverage detected