| 40 | } |
| 41 | |
| 42 | void MultiObjectCache::addEntryToObjectCache(VFS::Path::NormalizedView filename, osg::Object* object) |
| 43 | { |
| 44 | if (!object) |
| 45 | { |
| 46 | OSG_ALWAYS << " trying to add NULL object to cache for " << filename << std::endl; |
| 47 | return; |
| 48 | } |
| 49 | std::lock_guard<std::mutex> lock(_objectCacheMutex); |
| 50 | _objectCache.emplace(filename, object); |
| 51 | } |
| 52 | |
| 53 | osg::ref_ptr<osg::Object> MultiObjectCache::takeFromObjectCache(VFS::Path::NormalizedView fileName) |
| 54 | { |