mirror of
https://github.com/overte-org/overte.git
synced 2025-04-21 04:03:59 +02:00
Merge branch 'master' of https://github.com/highfidelity/hifi into metavoxels
This commit is contained in:
commit
564bce7c10
1 changed files with 7 additions and 3 deletions
|
@ -28,9 +28,13 @@ ResourceCache::ResourceCache(QObject* parent) :
|
|||
}
|
||||
|
||||
ResourceCache::~ResourceCache() {
|
||||
// make sure our unused resources know we're out of commission
|
||||
foreach (const QSharedPointer<Resource>& resource, _unusedResources) {
|
||||
resource->setCache(NULL);
|
||||
// the unused resources may themselves reference resources that will be added to the unused
|
||||
// list on destruction, so keep clearing until there are no references left
|
||||
while (!_unusedResources.isEmpty()) {
|
||||
foreach (const QSharedPointer<Resource>& resource, _unusedResources) {
|
||||
resource->setCache(NULL);
|
||||
}
|
||||
_unusedResources.clear();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue