mirror of
https://github.com/moses-smt/mosesdecoder.git
synced 2025-01-06 19:49:41 +03:00
no more leaks
This commit is contained in:
parent
0c1a976baa
commit
e45477bf69
@ -37,6 +37,10 @@ Search::Search(Manager &mgr)
|
|||||||
|
|
||||||
Search::~Search()
|
Search::~Search()
|
||||||
{
|
{
|
||||||
|
for (size_t i = 0; i < m_cubeEdges.size(); ++i) {
|
||||||
|
CubeEdges *edges = m_cubeEdges[i];
|
||||||
|
delete edges;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void Search::Decode()
|
void Search::Decode()
|
||||||
@ -44,7 +48,7 @@ void Search::Decode()
|
|||||||
// init cue edges
|
// init cue edges
|
||||||
m_cubeEdges.resize(mgr.GetInput().GetSize() + 1);
|
m_cubeEdges.resize(mgr.GetInput().GetSize() + 1);
|
||||||
for (size_t i = 0; i < m_cubeEdges.size(); ++i) {
|
for (size_t i = 0; i < m_cubeEdges.size(); ++i) {
|
||||||
m_cubeEdges[i] = new (mgr.GetPool().Allocate<CubeEdges>()) CubeEdges();
|
m_cubeEdges[i] = new CubeEdges();
|
||||||
}
|
}
|
||||||
|
|
||||||
const Bitmap &initBitmap = mgr.GetBitmaps().GetInitialBitmap();
|
const Bitmap &initBitmap = mgr.GetBitmaps().GetInitialBitmap();
|
||||||
|
Loading…
Reference in New Issue
Block a user