Skip to content

Commit

Permalink
fix memory leak in DeltMonitor::Output
Browse files Browse the repository at this point in the history
  • Loading branch information
jensgerlach committed Oct 22, 2015
1 parent 1e18c81 commit 9dd8447
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/DeltaMonitor.cpp
Expand Up @@ -187,9 +187,8 @@ DeltaMonitor::Output(ostream &out)
std::string s;

get_sequence(s);
ofstream *ofile = new ofstream(output_file_.c_str());
*ofile << s;
ofile->close();
ofstream ofile(output_file_.c_str());
ofile << s;
}

const std::string &
Expand Down

0 comments on commit 9dd8447

Please sign in to comment.