Scroom 0.14-49-gb7ae7a6d
Loading...
Searching...
No Matches
DontDelete< T > Class Template Reference

#include <dont-delete.hh>

Collaboration diagram for DontDelete< T >:
Collaboration graph

Public Member Functions

void operator() (T *)
 

Detailed Description

template<typename T>
class DontDelete< T >

Allow boost shared pointers to asynchronously delete their targets.

When some objects last shared pointer goes out of scope, the object is deleted. Usually, this is done on the thread that destroys the last pointer. This class allows destruction to be done on a separate thread.

This is especially advantageous if deleting the object takes a long time and there is no immediate hurry. Deleting ThreadPool::Queue objects, for example, blocks as long as a thread is currently executing a job on the queue. This might take some time you do not wish to wait.

Member Function Documentation

◆ operator()()

template<typename T >
void DontDelete< T >::operator() ( T *  )
inline
28{}

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