Skip to content
Snippets Groups Projects
Commit 77846eb6 authored by Giovanni La Mura's avatar Giovanni La Mura
Browse files

Correct valgrind memory leaks

parent d5bb62ce
Branches
Tags
No related merge requests found
......@@ -856,6 +856,7 @@ ScattererConfiguration* ScattererConfiguration::from_hdf5(const std::string& fil
} // di loop
delete[] elements;
status = hdf_file->close();
delete hdf_file;
conf = new ScattererConfiguration(
nsph,
configuration_count,
......@@ -873,8 +874,8 @@ ScattererConfiguration* ScattererConfiguration::from_hdf5(const std::string& fil
_wp,
_xip
);
delete[] xi_vec;
}
return conf;
}
......
......@@ -326,15 +326,18 @@ void lffft(string data_file, string output_path) {
if (is != 2222) {
if (is != 1111) {
if (is > 0) { // Goes to 305
if (ac) delete[] ac;
ac = new dcomplex[cil->nlemt]();
camp(ac, am0m, ws, cil);
// Goes to 445
} else if (is < 0) { // Goes to 405
if (ac) delete[] ac;
ac = new dcomplex[cil->nlemt]();
czamp(ac, amd, indam, ws, cil);
// Goes to 445
}
} else {
if (ac) delete[] ac;
ac = new dcomplex[cil->nlemt]();
samp(ac, tmsm, tmse, ws, cil);
// Goes to 445
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment