omni::core::kBorrow

Defined in omni/core/IObject.h

constexpr details::BorrowPtrType omni::core::kBorrow = {}

Used to create an ObjectPtr that increments an objects reference count.

IMyType* raw = /* ... */;
auto smart = ObjectPtr<IMyType>(myType, kBorrow);

ObjectPtr’s rarely “borrow” raw pointers, rather they usually “steal” them (see kSteal).

See omni::core::borrow().