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 weak_ptr. This probably had limited effect since the forest is only destroyed at the very end of the process.
PR Checklist
[ ] Code passes cpplint
[ ] New features are documented.
[ ] Adds a test for any bugs fixed. Adds tests for new features.
[ ] Code is formatted
[ ] 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
toweak_ptr
. This probably had limited effect since the forest is only destroyed at the very end of the process.PR Checklist