fix various memory leaks
authorsapier <Sapier at GMX dot net>
Sun, 7 Apr 2013 20:27:27 +0000 (22:27 +0200)
committerkwolekr <kwolekr@minetest.net>
Tue, 9 Apr 2013 06:23:07 +0000 (02:23 -0400)
src/mesh.cpp
src/server.cpp
src/test.cpp

index c2e6bcaa4dd6256194f2f193274b80fe92e6afd1..da0dbe44235d3b049d1a273c96d09865184a2100 100644 (file)
@@ -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);
index 05075a72c3079880805810f089c862f002ba242a..b7287c91f0f47cb01bc46e9c0424a18133b688bd 100644 (file)
@@ -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;
index d18bd8b931d5064569dc075bf5eb241980714079..d1f53f8803ef8c6b6f3bae2eb73058c1bf292ef8 100644 (file)
@@ -1781,5 +1781,7 @@ void run_tests()
                errorstream<<"run_tests() aborting."<<std::endl;
                abort();
        }
+       delete idef;
+       delete ndef;
 }