diff --git a/components/resource/scenemanager.cpp b/components/resource/scenemanager.cpp index 698060597..fc31b00a0 100644 --- a/components/resource/scenemanager.cpp +++ b/components/resource/scenemanager.cpp @@ -689,13 +689,13 @@ namespace Resource void SceneManager::updateCache(double referenceTime) { - mSharedStateMutex.lock(); - mSharedStateManager->prune(); - mSharedStateMutex.unlock(); - ResourceManager::updateCache(referenceTime); mInstanceCache->removeUnreferencedObjectsInCache(); + + mSharedStateMutex.lock(); + mSharedStateManager->prune(); + mSharedStateMutex.unlock(); } void SceneManager::reportStats(unsigned int frameNumber, osg::Stats *stats)