From: sapier Date: Sun, 7 Apr 2013 20:27:27 +0000 (+0200) Subject: fix various memory leaks X-Git-Url: http://81.2.79.47:8989/gitweb/?a=commitdiff_plain;h=04c3b17c780f78fcaa23af8187b5e5e30ff8fcab;p=zefram%2Fminetest%2Fminetest_engine.git fix various memory leaks --- diff --git a/src/mesh.cpp b/src/mesh.cpp index c2e6bcaa..da0dbe44 100644 --- a/src/mesh.cpp +++ b/src/mesh.cpp @@ -246,6 +246,8 @@ static scene::IAnimatedMesh* extrudeARGB(u32 twidth, u32 theight, u8 *data) } } + delete[] solidity; + // Add to mesh scene::SMesh *mesh = new scene::SMesh(); mesh->addMeshBuffer(buf); diff --git a/src/server.cpp b/src/server.cpp index 05075a72..b7287c91 100644 --- a/src/server.cpp +++ b/src/server.cpp @@ -904,6 +904,9 @@ Server::~Server() */ stop(); + //shutdown all emerge threads first! + delete m_emerge; + /* Delete clients */ @@ -923,7 +926,6 @@ Server::~Server() // Delete things in the reverse order of creation delete m_env; delete m_rollback; - delete m_emerge; delete m_event; delete m_itemdef; delete m_nodedef; diff --git a/src/test.cpp b/src/test.cpp index d18bd8b9..d1f53f88 100644 --- a/src/test.cpp +++ b/src/test.cpp @@ -1781,5 +1781,7 @@ void run_tests() errorstream<<"run_tests() aborting."<