Ptr

template<typename T>
class Ptr

Reference counted pointer.

It works like std::shared_ptr<T>

Template Parameters:

T – C++ type we point to

Public Functions

inline T &operator*() const

Dereference the pointer.

Public Static Functions

template<typename ...ARGS>
static inline Ptr<T> alloc(ARGS&&... args)

Allocate a new object and return a Ptr to it.

Template Parameters:
  • T – C++ type we point to

  • ARGS

Parameters:

args – Arguments passed into a constructor