Fix a memleak pointed by @Zeno- in MeshUpdateQueue
This leak was introduced when added cache to MeshUpdateQueue and only occurs when leaving world.master
parent
1bf9b25fb4
commit
582ee15d8e
|
@ -83,6 +83,11 @@ MeshUpdateQueue::~MeshUpdateQueue()
|
||||||
{
|
{
|
||||||
MutexAutoLock lock(m_mutex);
|
MutexAutoLock lock(m_mutex);
|
||||||
|
|
||||||
|
for (std::map<v3s16, CachedMapBlockData *>::iterator i = m_cache.begin();
|
||||||
|
i != m_cache.end(); ++i) {
|
||||||
|
delete i->second;
|
||||||
|
}
|
||||||
|
|
||||||
for (std::vector<QueuedMeshUpdate*>::iterator i = m_queue.begin();
|
for (std::vector<QueuedMeshUpdate*>::iterator i = m_queue.begin();
|
||||||
i != m_queue.end(); ++i) {
|
i != m_queue.end(); ++i) {
|
||||||
QueuedMeshUpdate *q = *i;
|
QueuedMeshUpdate *q = *i;
|
||||||
|
|
Loading…
Reference in New Issue