Gromacs
2024.3
|
#include <gromacs/utility/nodelete.h>
Deleter for std::shared_ptr that does nothing.
This is useful for cases where a class needs to keep a reference to another class, and optionally also manage the lifetime of that other class. The simplest construct (that does not force all callers to use heap allocation and std::shared_ptr for the referenced class) is to use a single std::shared_ptr to hold that reference, and use no_delete as the deleter if the lifetime is managed externally.
Public Member Functions | |
void | operator() (T *) |
Deleter that does nothing. | |