parthenon-hpc-lab / parthenon

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

WIP: Bugfix: Remove `shared_ptr` cycle in `Tree` #1110

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 weak_ptr. This probably had limited effect since the forest is only destroyed at the very end of the process.

PR Checklist