BUGFIX Fixed the leak of an empty memory block.

This commit is contained in:
Philipp Möller 2012-04-17 12:03:00 +00:00
parent 0c5b3fcf85
commit 3889dc2d7f
1 changed files with 6 additions and 3 deletions

View File

@ -219,8 +219,11 @@ void Basic_sweep_line_2<Tr, Vis, Subcv, Evnt, Alloc>::_init_structures()
CGAL_assertion(m_queue->empty());
CGAL_assertion((m_statusLine.size() == 0));
// Allocate all of the Subcurve objects as one block.
// Allocate all of the Subcurve objects as one block. Don't allocate
// anything when there are no subcurves.
if (m_num_of_subCurves > 0) {
m_subCurves = m_subCurveAlloc.allocate(m_num_of_subCurves);
}
return;
}