OpenM++ runtime library (libopenm)
|
simple resource exit guard implementation More...
#include <omHelper.h>
Public Types | |
typedef void(ResourceHolder::* | CleanupHandler) (void) |
resource release method of resource holder class | |
Public Member Functions | |
exit_guard (ResourceHolder *const i_holder, CleanupHandler i_cleanupFnc) | |
create resource guard to release resource on block exit | |
~exit_guard (void) noexcept | |
release resource if exit guard hold() was not called | |
void | hold (void) noexcept |
hold resource on exit instead of relesing it | |
simple resource exit guard implementation