mirror of
https://github.com/overte-org/overte.git
synced 2025-08-08 04:57:23 +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,10 +28,14 @@ ResourceCache::ResourceCache(QObject* parent) :
|
||||||
}
|
}
|
||||||
|
|
||||||
ResourceCache::~ResourceCache() {
|
ResourceCache::~ResourceCache() {
|
||||||
// make sure our unused resources know we're out of commission
|
// 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) {
|
foreach (const QSharedPointer<Resource>& resource, _unusedResources) {
|
||||||
resource->setCache(NULL);
|
resource->setCache(NULL);
|
||||||
}
|
}
|
||||||
|
_unusedResources.clear();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void ResourceCache::refresh(const QUrl& url) {
|
void ResourceCache::refresh(const QUrl& url) {
|
||||||
|
|
Loading…
Reference in a new issue