omni::core::kSteal

Defined in omni/core/IObject.h

constexpr detail::StealPtrType omni::core::kSteal = {}

Used to create an ObjectPtr that does not increments an objects reference count. The ObjectPtr does decrement the reference count of the raw pointer upon the ObjectPtr’s destruction.

auto smart = ObjectPtr<IMyType>(createMyType, kSteal);

Stealing a raw pointer is quite common when a function returns a raw interface pointer.

See omni::core::steal().