Skip to content
Permalink
Browse files
Fix a memleak pointed by @Zeno- in MeshUpdateQueue
This leak was introduced when added cache to MeshUpdateQueue and only occurs when leaving world.
  • Loading branch information
nerzhul committed May 16, 2017
1 parent 1bf9b25 commit 582ee15d8e861efb9cc843963a95c087dae91bcc
Showing 1 changed file with 5 additions and 0 deletions.
@@ -83,6 +83,11 @@ MeshUpdateQueue::~MeshUpdateQueue()
{
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();
i != m_queue.end(); ++i) {
QueuedMeshUpdate *q = *i;

1 comment on commit 582ee15

@Zeno-
Copy link
Contributor

@Zeno- Zeno- commented on 582ee15 May 16, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @nerzhul

Please sign in to comment.