diff --git a/contrib/other-builds/moses2/Search/CubePruning/Search.cpp b/contrib/other-builds/moses2/Search/CubePruning/Search.cpp index 9c8ca5429..b602f158e 100644 --- a/contrib/other-builds/moses2/Search/CubePruning/Search.cpp +++ b/contrib/other-builds/moses2/Search/CubePruning/Search.cpp @@ -37,9 +37,6 @@ Search::Search(Manager &mgr) Search::~Search() { - BOOST_FOREACH(CubeEdges &edges, m_cubeEdges) { - RemoveAllInColl(edges); - } } void Search::Decode() @@ -191,7 +188,7 @@ void Search::PostDecode(size_t stackInd) BOOST_FOREACH(const TargetPhrases *tps, path.targetPhrases) { if (tps && tps->GetSize()) { - CubeEdge *edge = new CubeEdge(m_mgr, sortedHypos, path, *tps, newBitmap); + CubeEdge *edge = new (pool.Allocate()) CubeEdge(m_mgr, sortedHypos, path, *tps, newBitmap); edges.push_back(edge); } }