aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsapier <Sapier at GMX dot net>2013-04-07 22:27:27 +0200
committerkwolekr <kwolekr@minetest.net>2013-04-09 02:23:07 -0400
commit04c3b17c780f78fcaa23af8187b5e5e30ff8fcab (patch)
treedb542bd78f496cb4c470231265e0078c54e2ee71
parent58fd39de35fc541ee6f50cc7b85ff29ab749778a (diff)
downloadminetest-04c3b17c780f78fcaa23af8187b5e5e30ff8fcab.tar.gz
minetest-04c3b17c780f78fcaa23af8187b5e5e30ff8fcab.tar.bz2
minetest-04c3b17c780f78fcaa23af8187b5e5e30ff8fcab.zip
fix various memory leaks
-rw-r--r--src/mesh.cpp2
-rw-r--r--src/server.cpp4
-rw-r--r--src/test.cpp2
3 files changed, 7 insertions, 1 deletions
diff --git a/src/mesh.cpp b/src/mesh.cpp
index c2e6bcaa4..da0dbe442 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 05075a72c..b7287c91f 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 d18bd8b93..d1f53f880 100644
--- a/src/test.cpp
+++ b/src/test.cpp
@@ -1781,5 +1781,7 @@ void run_tests()
errorstream<<"run_tests() aborting."<<std::endl;
abort();
}
+ delete idef;
+ delete ndef;
}