Skip to content

Commit

Permalink
fix various memory leaks
Browse files Browse the repository at this point in the history
  • Loading branch information
sapier authored and kwolekr committed Apr 9, 2013
1 parent 58fd39d commit 04c3b17
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
2 changes: 2 additions & 0 deletions src/mesh.cpp
Expand Up @@ -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);
Expand Down
4 changes: 3 additions & 1 deletion src/server.cpp
Expand Up @@ -904,6 +904,9 @@ Server::~Server()
*/
stop();

//shutdown all emerge threads first!
delete m_emerge;

/*
Delete clients
*/
Expand All @@ -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;
Expand Down
2 changes: 2 additions & 0 deletions src/test.cpp
Expand Up @@ -1781,5 +1781,7 @@ void run_tests()
errorstream<<"run_tests() aborting."<<std::endl;
abort();
}
delete idef;
delete ndef;
}

0 comments on commit 04c3b17

Please sign in to comment.