Release ownership, load deleter, and return the target pointer.
Synopsis
Declared in <bslma_managedptr.h>
TARGET_TYPE*
release(ManagedPtrDeleter* deleter);
Description
Load the specified deleter for the currently managed object and reset this managed pointer to empty. Return a raw pointer to the target object (if any) managed by this pointer. It is undefined behavior to run the returned deleter unless the returned pointer to target object is not null.
Return Value
raw pointer to the target object, or null if empty
Parameters
Name |
Description |
deleter |
out‐parameter receiving the current deleter |
Created with MrDocs