|
MeVisLab Toolbox Reference
|
A guard that protects resources of a given class from being detroyed if another thread still works with them. More...
#include <ResourceDestructionGuard.h>
Public Member Functions | |
| ResourceDestructionGuard () | |
| ResourceDestructionGuard (const ResourceDestructionGuard &)=default | |
| ResourceDestructionGuard & | operator= (const ResourceDestructionGuard &)=default |
| ~ResourceDestructionGuard () | |
| WeakHandle | handle () const |
A guard that protects resources of a given class from being detroyed if another thread still works with them.
One might think this is not necessary, there is std::shared_ptr for it. But - for objects that don't have shared ownership which are out of control regarding construction/destruction (think of MeVisLab modules controlled by MeVisLab), you need to make sure that MeVisLab doesn't destroys your object while threads are working with it.
Synopsis:
Definition at line 67 of file ResourceDestructionGuard.h.
| asio::ResourceDestructionGuard::ResourceDestructionGuard | ( | ) |
Referenced by operator=(), and ResourceDestructionGuard().
|
default |
References ResourceDestructionGuard().
| asio::ResourceDestructionGuard::~ResourceDestructionGuard | ( | ) |
| WeakHandle asio::ResourceDestructionGuard::handle | ( | ) | const |
|
default |
References ResourceDestructionGuard().