Block-Structured AMR Software Framework
Loading...
Searching...
No Matches
amrex::DataDeleter Struct Reference

Custom deleter that returns memory to an Arena. More...

#include <AMReX_DataAllocator.H>

Public Member Functions

 DataDeleter () noexcept=default
 Default-construct; operator() will use The_Arena().
 DataDeleter (Arena *ar) noexcept
 Construct with an explicit arena ar.
Arena * arena () const noexcept
 Return the stored arena, or The_Arena() if none was set.
void operator() (void *pt) const noexcept
 Return the allocation at pt to the arena.

Public Attributes

Arena * m_arena = nullptr

Detailed Description

Custom deleter that returns memory to an Arena.

Falls back to The_Arena() when no arena is supplied.

Constructor & Destructor Documentation

◆ DataDeleter() [1/2]

amrex::DataDeleter::DataDeleter ( )
defaultnoexcept

Default-construct; operator() will use The_Arena().

◆ DataDeleter() [2/2]

amrex::DataDeleter::DataDeleter ( Arena * ar)
inlinenoexcept

Construct with an explicit arena ar.

Member Function Documentation

◆ arena()

Arena * amrex::DataDeleter::arena ( ) const
inlinenodiscardnoexcept

Return the stored arena, or The_Arena() if none was set.

◆ operator()()

void amrex::DataDeleter::operator() ( void * pt) const
inlinenoexcept

Return the allocation at pt to the arena.

Member Data Documentation

◆ m_arena

Arena* amrex::DataDeleter::m_arena = nullptr

Stored arena pointer (may be null).


The documentation for this struct was generated from the following file: