Logo ROOT  
Reference Guide
ROOT::Experimental::Detail::RPageDeleter Class Reference

A closure that can free the memory associated with a mapped page.

The page pool, once taken ownership of pages, must know how to free them. When registering a new page with the page pool, the passed page deleter encapsulates that knowledge.

Definition at line 39 of file RPageAllocator.hxx.

Public Member Functions

 RPageDeleter ()
 
 RPageDeleter (const RPageDeleter &other)=default
 
 RPageDeleter (decltype(fFnDelete) fnDelete)
 
 RPageDeleter (decltype(fFnDelete) fnDelete, void *userData)
 
 ~RPageDeleter ()=default
 
void operator() (const RPage &page)
 
RPageDeleteroperator= (const RPageDeleter &other)=default
 

Private Attributes

std::function< void(const RPage &page, void *userData)> fFnDelete
 The callable that is suppped to free the given page; it is called with fUserData as the second argument. More...
 
voidfUserData
 Optionally additional information necessary to free resources associated with a page. More...
 

#include <ROOT/RPageAllocator.hxx>

Constructor & Destructor Documentation

◆ RPageDeleter() [1/4]

ROOT::Experimental::Detail::RPageDeleter::RPageDeleter ( )
inline

Definition at line 49 of file RPageAllocator.hxx.

◆ RPageDeleter() [2/4]

ROOT::Experimental::Detail::RPageDeleter::RPageDeleter ( decltype(fFnDelete fnDelete)
inlineexplicit

Definition at line 50 of file RPageAllocator.hxx.

◆ RPageDeleter() [3/4]

ROOT::Experimental::Detail::RPageDeleter::RPageDeleter ( decltype(fFnDelete fnDelete,
void userData 
)
inline

Definition at line 51 of file RPageAllocator.hxx.

◆ RPageDeleter() [4/4]

ROOT::Experimental::Detail::RPageDeleter::RPageDeleter ( const RPageDeleter other)
default

◆ ~RPageDeleter()

ROOT::Experimental::Detail::RPageDeleter::~RPageDeleter ( )
default

Member Function Documentation

◆ operator()()

void ROOT::Experimental::Detail::RPageDeleter::operator() ( const RPage page)
inline

Definition at line 56 of file RPageAllocator.hxx.

◆ operator=()

RPageDeleter & ROOT::Experimental::Detail::RPageDeleter::operator= ( const RPageDeleter other)
default

Member Data Documentation

◆ fFnDelete

std::function<void(const RPage &page, void *userData)> ROOT::Experimental::Detail::RPageDeleter::fFnDelete
private

The callable that is suppped to free the given page; it is called with fUserData as the second argument.

Definition at line 42 of file RPageAllocator.hxx.

◆ fUserData

void* ROOT::Experimental::Detail::RPageDeleter::fUserData
private

Optionally additional information necessary to free resources associated with a page.

For instance, when the page is read from a TKey, user data points to the ROOT object created for reading, which needs to be freed as well.

Definition at line 46 of file RPageAllocator.hxx.


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