mirror of
https://github.com/luanti-org/luanti.git
synced 2025-06-27 16:36:03 +00:00
Fix mem leak in mesh cache (#5781)
This commit is contained in:
parent
ce9802266e
commit
d176dabeb4
1 changed files with 1 additions and 0 deletions
|
@ -286,6 +286,7 @@ void MeshUpdateQueue::cleanupCache()
|
||||||
if (cached_block->refcount_from_queue == 0 &&
|
if (cached_block->refcount_from_queue == 0 &&
|
||||||
cached_block->last_used_timestamp < t_now - cache_seconds) {
|
cached_block->last_used_timestamp < t_now - cache_seconds) {
|
||||||
m_cache.erase(it++);
|
m_cache.erase(it++);
|
||||||
|
delete cached_block;
|
||||||
} else {
|
} else {
|
||||||
++it;
|
++it;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue