RTAB-Map 0.23.10
Real-Time Appearance-Based Mapping
Loading...
Searching...
No Matches
UDestroyer< T > Class Template Reference

#include <UDestroyer.h>

Public Member Functions

 UDestroyer (T *doomed=0)
 
bool setDoomed (T *doomed)
 

Detailed Description

template<class T>
class UDestroyer< T >

This class is used to delete a dynamically created objects. It was mainly designed to remove dynamically created Singleton. Created on the stack of a Singleton, when the application is finished, his destructor make sure that the Singleton is deleted.

Definition at line 32 of file UDestroyer.h.

Constructor & Destructor Documentation

◆ UDestroyer()

template<class T >
UDestroyer< T >::UDestroyer ( T *  doomed = 0)
inline

The constructor. Set the doomed object (take ownership of the object). The object is deleted when this object is deleted.

Definition at line 39 of file UDestroyer.h.

◆ ~UDestroyer()

template<class T >
UDestroyer< T >::~UDestroyer ( )
inline

Definition at line 41 of file UDestroyer.h.

Member Function Documentation

◆ setDoomed()

template<class T >
bool UDestroyer< T >::setDoomed ( T *  doomed)
inline

Set the doomed object. If a doomed object is already set, the function returns false.

Parameters
doomedthe doomed object
Returns
false if an object is already set and the new object is not null, otherwise true

Definition at line 55 of file UDestroyer.h.


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