Skip to content

Commit

Permalink
fix memory leak in GFA emitter
Browse files Browse the repository at this point in the history
  • Loading branch information
ekg committed Jan 6, 2021
1 parent 6387f99 commit c7abd01
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/gfa.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@ void emit_gfa(std::ostream& out,
uint64_t n_nodes = seq_id_cbv_rank(seq_id_cbv.size()-1);

// producer/consumer queues
auto seq_todo_q_ptr = new atomic_queue::AtomicQueue2<uint64_t, 2 << 16>;
auto seq_todo_q_ptr = std::make_unique<atomic_queue::AtomicQueue2<uint64_t, 2 << 16>>();
auto& seq_todo_q = *seq_todo_q_ptr;
auto seq_done_q_ptr = new atomic_queue::AtomicQueue2<std::pair<uint64_t, std::string*>, 2 << 16>;
auto seq_done_q_ptr = std::make_unique<atomic_queue::AtomicQueue2<std::pair<uint64_t, std::string*>, 2 << 16>>();
auto& seq_done_q = *seq_done_q_ptr;
std::atomic<bool> work_todo;
std::map<uint64_t, std::string*> node_records;
Expand Down

0 comments on commit c7abd01

Please sign in to comment.