This PR removes a memory leak caused by a closed shared_ptr cycle in forest::Tree by switching the neighbor pointers from shared_ptr to non-owning raw pointers. This probably had limited effect since the forest is only destroyed at the very end of the process. I found this using -DENABLE_ASAN=On.
PR Checklist
[x] Code passes cpplint
[ ] New features are documented.
[ ] Adds a test for any bugs fixed. Adds tests for new features.
[x] Code is formatted
[x] Changes are summarized in CHANGELOG.md
[ ] Change is breaking (API, behavior, ...)
[ ] Change is additionally added to CHANGELOG.md in the breaking section
[ ] PR is marked as breaking
[ ] Short summary API changes at the top of the PR (plus optionally with an automated update/fix script)
[ ] CI has been triggered on Darwin for performance regression tests.
[ ] Docs build
[ ] (@lanl.gov employees) Update copyright on changed files
PR Summary
This PR removes a memory leak caused by a closed
shared_ptr
cycle inforest::Tree
by switching the neighbor pointers fromshared_ptr
to non-owning raw pointers. This probably had limited effect since the forest is only destroyed at the very end of the process. I found this using-DENABLE_ASAN=On
.PR Checklist