summaryrefslogtreecommitdiffstats
path: root/src/Generating/POCPieceGenerator.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/Generating/POCPieceGenerator.cpp')
-rw-r--r--src/Generating/POCPieceGenerator.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/Generating/POCPieceGenerator.cpp b/src/Generating/POCPieceGenerator.cpp
index 9ed4b565e..6e7e74d7a 100644
--- a/src/Generating/POCPieceGenerator.cpp
+++ b/src/Generating/POCPieceGenerator.cpp
@@ -150,7 +150,7 @@ static void DebugPieces(const cPlacedPieces & a_Pieces)
-///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+////////////////////////////////////////////////////////////////////////////////
// cPOCPieceGenerator:
cPOCPieceGenerator::cPOCPieceGenerator(int a_Seed) :
@@ -186,6 +186,11 @@ cPOCPieceGenerator::cPOCPieceGenerator(int a_Seed) :
cPOCPieceGenerator::~cPOCPieceGenerator()
{
cPieceGenerator::FreePieces(m_Pieces);
+ for (cPieces::iterator itr = m_AvailPieces.begin(), end = m_AvailPieces.end(); itr != end; ++itr)
+ {
+ delete *itr;
+ }
+ m_AvailPieces.clear();
}