-
Notifications
You must be signed in to change notification settings - Fork 23
Open
Labels
enhancementNew feature or requestNew feature or request
Description
We cannot rely on the last del/reference drop to an object to really release and free the object in Python:
https://stackoverflow.com/a/17644536/2719194
import amrex
amrex.initialize([])
mfab = amrex.MultiFab( ... )
del mfab # freed in CPython, but not guaranteed by Python per se
amrex.finalize()This code can lead to Python holding on to mfab over the lifetime of amrex.finalize(). When using memory in an AMReX area, their actual free after finalize() will be UB and usually segfault.
Refs.:
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request