OpenDaVINCI  4.15.3
odcore::wrapper::DisposalService Class Reference

#include <DisposalService.h>

Public Member Functions

virtual ~DisposalService ()
 
void cleanUpFinally ()
 
void addDisposableForRegularRemoval (Disposable **d)
 
void addDisposableForFinalRemoval (Disposable **d)
 
void cleanUpImmediately ()
 

Static Public Member Functions

static DisposalServicegetInstance ()
 

Protected Member Functions

 DisposalService ()
 

Detailed Description

Disposal service for cleaning up.

Constructor & Destructor Documentation

odcore::wrapper::DisposalService::~DisposalService ( )
virtual

References cleanUpFinally().

Member Function Documentation

void odcore::wrapper::DisposalService::addDisposableForFinalRemoval ( Disposable **  d)

This method adds a pointer to get deleted when closing the program.

Parameters
dDisposable to delete.
void odcore::wrapper::DisposalService::addDisposableForRegularRemoval ( Disposable **  d)

This method adds a pointer to get deleted next time the regular cleaner is running.

Parameters
dDisposable to delete.
void odcore::wrapper::DisposalService::cleanUpFinally ( )

This method cleans up finally all existing instances and should be called inside atexit().

References CLOG2, and OPENDAVINCI_CORE_FREE_POINTER.

Referenced by odcore::base::module::finalize(), and ~DisposalService().

void odcore::wrapper::DisposalService::cleanUpImmediately ( )

This method invokes an immediate cleanup pass.

DisposalService & odcore::wrapper::DisposalService::getInstance ( )
static

Singleton getter.

Returns
Instance of the concrete factory.

References DisposalService().

Referenced by odcore::base::module::finalize().