1
0

Fixed a memory leak in NetherFortGen.

This commit is contained in:
madmaxoft 2014-03-28 17:09:47 +01:00
parent ae0954f1d4
commit 3c84a995a9

View File

@ -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 */