Holds on to smart pointers by value, and lets you free them by providing the corresponding void *. More...
#include <osvr/Util/KeyedOwnershipContainer.h>
Inherits Policy.
Public Member Functions | |
template<typename T > | |
void * | acquire (T ptr) |
Adds an object held by a smart pointer to our ownership, returning its void * usable to release it before the destruction of this object. | |
bool | release (void *ptr) |
Releases the indicated smart pointer in our ownership, if we have it. More... | |
Holds on to smart pointers by value, and lets you free them by providing the corresponding void *.
Definition at line 83 of file KeyedOwnershipContainer.h.
|
inline |
Releases the indicated smart pointer in our ownership, if we have it.
Note that this just releases the smart pointer object that we have - the underlying memory may not be freed if your smart pointer is still referenced elsewhere, for instance.
Definition at line 100 of file KeyedOwnershipContainer.h.