carb::stealObject

Defined in carb/IObject.h

template<class T>
inline ObjectPtr<T> carb::stealObject(T *other)

Helper function to create carb::ObjectPtr from a carb::IObject pointer by “stealing” the pointer; that is, without increasing the reference count.

Parameters

other – The raw pointer to steal.

Returns

A smart pointer referencing other.