Skip to content

Commit

Permalink
Merge pull request #193 from hdante/fix-memory-leak
Browse files Browse the repository at this point in the history
Fix memory leak
  • Loading branch information
johannct authored Aug 29, 2024
2 parents ef9a5c3 + 7f420cb commit dbe015b
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/lib/photoz_lib.h
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,12 @@ class PhotoZ {
PhotoZ(keymap &key_analysed);

virtual ~PhotoZ() {
for (auto &sed : fullLib) delete sed;
for (auto &sed : fullLibIR) delete sed;
for (auto &sed : lightLib) delete sed;
fullLib.clear();
fullLibIR.clear();
lightLib.clear();
}

std::tuple<vector<double>, vector<double>> run_autoadapt(vector<onesource *>);
Expand Down

0 comments on commit dbe015b

Please sign in to comment.