Commit 9913ecbe authored by Mikaël Salson's avatar Mikaël Salson

Algo: Delete MultiGermlines

Germline stored in a MultiGermline are also deleted by the destructor
parent a942fb54
......@@ -95,6 +95,12 @@ MultiGermline::MultiGermline(string f_germlines_json)
germlines.push_back(germline);
}
MultiGermline::~MultiGermline() {
for (list<Germline*>::const_iterator it = germlines.begin(); it != germlines.end(); ++it)
{
delete *it ;
}
}
void MultiGermline::insert(Germline *germline)
{
......
......@@ -64,6 +64,7 @@ class MultiGermline {
MultiGermline();
MultiGermline(string f_germlines_json);
~MultiGermline();
void insert(Germline *germline);
void load_default_set();
......
......@@ -91,6 +91,8 @@ void testSegmentOverlap()
TEST_FINE_SEGMENT_OVERLAP,
" V= " << fs.seg_V << ", N = " << fs.seg_N << ", J = " << fs.seg_J);
}
delete multi1;
}
void testSegmentationCause() {
......@@ -183,6 +185,8 @@ void testSegmentationCause() {
}
TAP_TEST(nb_checked == 11, TEST_KMER_DATA, "");
delete multi;
}
void testExtractor() {
......@@ -236,6 +240,7 @@ void testExtractor() {
TAP_TEST(out_unseg.tellp() > 0, TEST_EXTRACTOR_OUT_UNSEG, "");
delete ws;
delete multi;
}
void testSegment() {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment