Skip to content

Commit

Permalink
Merge pull request #993 from VincentRouvreau/fix_landscapes_sanitizer…
Browse files Browse the repository at this point in the history
…_issue

Fix Persistence_representations landscape memory leak
  • Loading branch information
VincentRouvreau authored Oct 31, 2023
2 parents ac4e237 + cfd3e09 commit 106b6eb
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ jobs:
cd build
cmake -DCMAKE_BUILD_TYPE=Debug -DCMAKE_CXX_FLAGS=-fsanitize=address -DWITH_GUDHI_EXAMPLE=OFF -DWITH_GUDHI_TEST=ON -DWITH_GUDHI_UTILITIES=OFF -DWITH_GUDHI_PYTHON=OFF ..
make all
ctest --output-on-failure -E Persistence_lanscapes_test_unit
ctest --output-on-failure
utils:
docker:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -388,6 +388,7 @@ class Persistence_landscape {
nextLevelMerge.swap(nextNextLevelMerge);
}
(*this) = (*nextLevelMerge[0]);
if (!is_this_first_level) delete nextLevelMerge[0];
(*this) *= 1 / static_cast<double>(to_average.size());
}

Expand Down

0 comments on commit 106b6eb

Please sign in to comment.