Gromacs
2024.4
|
#include <gromacs/mdrun/simulationinputhandle.h>
Explicit deleter details for SimulationInputHolderImpl.
SimulationInputHolderImpl objects are created by the GROMACS library, but are destroyed when the SimulationInputHolder goes out of scope in the client code, which may be linked to a different allocator. We want to make sure that objects are allocated and deallocated with the same allocator, so we avoid the default deleter in unique_ptrs and compile allocation and deallocation code in the same translation unit.
Note that this does not solve potential ABI incompatibilities between the unique_ptr implementations themselves, but we need to consider ABI compatibility goals and challenges as well as supported use cases and ownership semantics.