Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Small Bugfix: Remove shared_ptr cycle in Tree #1112

Merged
merged 3 commits into from
Jun 14, 2024

Conversation

lroberts36
Copy link
Collaborator

@lroberts36 lroberts36 commented Jun 13, 2024

PR Summary

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

  • 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

@lroberts36 lroberts36 changed the title Bugfix: Remove shared_ptr cycle in Tree Small Bugfix: Remove shared_ptr cycle in Tree Jun 13, 2024
@lroberts36 lroberts36 added the bug Something isn't working label Jun 13, 2024
@lroberts36 lroberts36 merged commit 91bf08e into develop Jun 14, 2024
50 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants