parthenon-hpc-lab / parthenon

Parthenon AMR infrastructure
https://parthenon-hpc-lab.github.io/parthenon/
Other
112 stars 33 forks source link

Small Bugfix: Remove `shared_ptr` cycle in `Tree` #1112

Closed lroberts36 closed 3 months ago

lroberts36 commented 3 months ago

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