TIMPI
|
The SemiPermanent
"class" is basically just a place for a destructor vtable.
More...
#include <semipermanent.h>
Classes | |
struct | Ref |
Public Member Functions | |
SemiPermanent ()=default | |
virtual | ~SemiPermanent ()=default |
Static Public Member Functions | |
static void | add (std::unique_ptr< SemiPermanent > obj) |
Static Private Attributes | |
static int | _ref_count = 0 |
static std::vector< std::unique_ptr< SemiPermanent > > | _stuff_to_clean |
The SemiPermanent
"class" is basically just a place for a destructor vtable.
Derive from it and pass a unique_ptr to your derived object to SemiPermanent::add() whenever you have something that ought to be almost permanent: that should be cleaned up eventually to avoid resource leaks, but that should not be cleaned up until the last TIMPIInit object exits, just before the MPI_Finalize call if TIMPI initialized MPI.
Definition at line 48 of file semipermanent.h.
|
default |
|
virtualdefault |
|
static |
Definition at line 42 of file semipermanent.C.
References _ref_count, and _stuff_to_clean.
Referenced by TIMPI::StandardType< TIMPI_DEFAULT_SCALAR_TYPE >::StandardType(), TIMPI::StandardType< std::pair< T1, T2 >, typename std::enable_if< StandardType< typename std::remove_const< T1 >::type >::is_fixed_type &&StandardType< T2 >::is_fixed_type >::type >::StandardType(), TIMPI::StandardType< std::array< T, N >, typename std::enable_if< StandardType< T >::is_fixed_type >::type >::StandardType(), and TIMPI::StandardType< std::tuple< Types... >, typename std::enable_if< CheckAllFixedTypes< Types... >::is_fixed_type >::type >::StandardType().
|
staticprivate |
Definition at line 73 of file semipermanent.h.
Referenced by add(), TIMPI::SemiPermanent::Ref::Ref(), and TIMPI::SemiPermanent::Ref::~Ref().
|
staticprivate |
Definition at line 74 of file semipermanent.h.
Referenced by add(), and TIMPI::SemiPermanent::Ref::~Ref().