BloombergLP::bslma::ManagedPtr::load

load overloads

Synopses

Declared in <bslma_managedptr.h>

Take ownership of *ptr using the default allocator as deleter.

template<class MANAGED_TYPE>
void
load(MANAGED_TYPE* ptr);
» more...

Take ownership of *ptr destroyed via factory.

template<
    class MANAGED_TYPE,
    class FACTORY_TYPE>
void
load(
    MANAGED_TYPE* ptr,
    FACTORY_TYPE* factory);
» more...

Reset this managed pointer to empty.

void
load(
    bsl::nullptr_t nullPointerLiteral = 0,
    void* cookie = 0,
    DeleterFunc deleter = 0);
» more...

Take ownership of *ptr with the specified deleter.

template<class MANAGED_TYPE>
void
load(
    MANAGED_TYPE* ptr,
    void* cookie,
    DeleterFunc deleter);
» more...

Take ownership of *ptr with the specified deleter.

template<
    class MANAGED_TYPE,
    class COOKIE_TYPE>
void
load(
    MANAGED_TYPE* ptr,
    COOKIE_TYPE* cookie,
    DeleterFunc deleter);
» more...

Take ownership of *ptr with the specified deleter.

template<
    class MANAGED_TYPE,
    class MANAGED_BASE>
void
load(
    MANAGED_TYPE* ptr,
    void* cookie,
    void(* deleter)(MANAGED_BASE*, void*));
» more...

Take ownership of *ptr with the specified deleter.

template<
    class MANAGED_TYPE,
    class MANAGED_BASE,
    class COOKIE_TYPE,
    class COOKIE_BASE>
void
load(
    MANAGED_TYPE* ptr,
    COOKIE_TYPE* cookie,
    void(* deleter)(MANAGED_BASE*, COOKIE_BASE*));
» more...

Parameters

NameDescription
ptrpointer to the object to manage, or null
factoryfactory used to destroy the managed object
nullPointerLiteralnull-pointer literal (unused; selects this overload)
cookieunused cookie pointer
deleterunused deleter function