mirror of
https://github.com/overte-org/overte.git
synced 2025-07-26 05:37:34 +02:00
Pin File pointer during eject
This commit is contained in:
parent
758ae9825d
commit
497fd7f714
2 changed files with 3 additions and 2 deletions
|
@ -258,7 +258,8 @@ namespace cache {
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
void FileCache::eject(const FilePointer& file) {
|
// Take file pointer by value to insure it doesn't get destructed during the "erase()" calls
|
||||||
|
void FileCache::eject(FilePointer file) {
|
||||||
file->_locked = false;
|
file->_locked = false;
|
||||||
const auto& length = file->getLength();
|
const auto& length = file->getLength();
|
||||||
const auto& key = file->getKey();
|
const auto& key = file->getKey();
|
||||||
|
|
|
@ -119,7 +119,7 @@ private:
|
||||||
void clean();
|
void clean();
|
||||||
void clear();
|
void clear();
|
||||||
// Remove a file from the cache
|
// Remove a file from the cache
|
||||||
void eject(const FilePointer& file);
|
void eject(FilePointer file);
|
||||||
|
|
||||||
size_t getOverbudgetAmount() const;
|
size_t getOverbudgetAmount() const;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue