From 3c84a995a90122279cdb2f8cd60491e4d33c297f Mon Sep 17 00:00:00 2001 From: madmaxoft Date: Fri, 28 Mar 2014 17:09:47 +0100 Subject: Fixed a memory leak in NetherFortGen. --- src/Generating/NetherFortGen.cpp | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/Generating/NetherFortGen.cpp') diff --git a/src/Generating/NetherFortGen.cpp b/src/Generating/NetherFortGen.cpp index 25658da46..d111c7cee 100644 --- a/src/Generating/NetherFortGen.cpp +++ b/src/Generating/NetherFortGen.cpp @@ -29,6 +29,7 @@ public: int m_Seed; cPlacedPieces m_Pieces; + cNetherFort(cNetherFortGen & a_ParentGen, int a_BlockX, int a_BlockZ, int a_GridSize, int a_MaxDepth, int a_Seed) : m_ParentGen(a_ParentGen), m_BlockX(a_BlockX), @@ -43,6 +44,12 @@ public: cBFSPieceGenerator pg(m_ParentGen, a_Seed); pg.PlacePieces(a_BlockX, BlockY, a_BlockZ, a_MaxDepth, m_Pieces); } + + + ~cNetherFort() + { + cPieceGenerator::FreePieces(m_Pieces); + } /** Carves the system into the chunk data */ -- cgit v1.2.3