Skip to content

Commit

Permalink
Merge pull request #2476 from vgteam/fix-map-memory-leak
Browse files Browse the repository at this point in the history
resolve memory leaks in mapper (resolves #2421)
  • Loading branch information
adamnovak authored Sep 23, 2019
2 parents ed86372 + 134916c commit 94c19a1
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/cluster.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3521,9 +3521,9 @@ bdsg::HashGraph cluster_subgraph_containing(const HandleGraph& base, const Align
backward_max_dist.push_back(aligner->longest_detectable_gap(aln, mem.begin)
+ (mem.begin - aln.sequence().begin()));
}
auto cluster_graph = new bdsg::HashGraph();
algorithms::extract_containing_graph(&base, cluster_graph, positions, forward_max_dist, backward_max_dist);
return *cluster_graph;
auto cluster_graph = bdsg::HashGraph();
algorithms::extract_containing_graph(&base, &cluster_graph, positions, forward_max_dist, backward_max_dist);
return cluster_graph;
}

bdsg::HashGraph cluster_subgraph_walk(const HandleGraph& base, const Alignment& aln, const vector<vg::MaximalExactMatch>& mems, double expansion) {
Expand Down
5 changes: 5 additions & 0 deletions src/subcommand/map_main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1217,6 +1217,11 @@ int main_map(int argc, char** argv) {

cout.flush();

// clean up our mappers
for (uint64_t i = 0; i < mapper.size(); ++i) {
delete mapper[i];
}

return 0;

}
Expand Down

2 comments on commit 94c19a1

@adamnovak
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

vg CI tests complete for merge to master. View the full report here.

19 tests passed, 0 tests failed and 0 tests skipped in 12951 seconds

Tests produced 362 warnings. 362 were for lower-than-expected alignment scores

@adamnovak
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

vg CI tests complete for branch v1.19.0. View the full report here.

19 tests passed, 0 tests failed and 0 tests skipped in 13207 seconds

Tests produced 361 warnings. 361 were for lower-than-expected alignment scores

Please sign in to comment.