| 293 | |
| 294 | template<typename T> |
| 295 | void removeUnusedItems(FlatMap<StringBox, T>& items) { |
| 296 | auto it = items.begin(); |
| 297 | while (it != items.end()) { |
| 298 | if (it->second.use_count() == 1) { |
| 299 | it = items.erase(it); |
| 300 | } else { |
| 301 | ++it; |
| 302 | } |
| 303 | } |
| 304 | } |
| 305 | |
| 306 | void Bundle::unloadUnusedResources() { |
| 307 | std::lock_guard<std::recursive_mutex> guard(_mutex); |
no test coverage detected