mirror of
https://github.com/HifiExperiments/overte.git
synced 2025-07-16 22:26:16 +02:00
fix ref accounting for garbage collection
This commit is contained in:
parent
06d40afeac
commit
b79af55e16
1 changed files with 1 additions and 1 deletions
|
@ -119,7 +119,7 @@ bool CollisionRenderMeshCache::releaseMesh(CollisionRenderMeshCache::Key key) {
|
||||||
CollisionMeshMap::const_iterator itr = _geometryMap.find(key);
|
CollisionMeshMap::const_iterator itr = _geometryMap.find(key);
|
||||||
if (itr != _geometryMap.end()) {
|
if (itr != _geometryMap.end()) {
|
||||||
assert((*itr).second.use_count() != 1);
|
assert((*itr).second.use_count() != 1);
|
||||||
if ((*itr).second.use_count() == 2) {
|
if ((*itr).second.use_count() == 1) {
|
||||||
// we hold all of the references inside the cache so we'll try to delete later
|
// we hold all of the references inside the cache so we'll try to delete later
|
||||||
_pendingGarbage.push_back(key);
|
_pendingGarbage.push_back(key);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue