![]() |
Public API Reference |
![]() |
A pointer encapsulator. More...
#include <csutil/ref.h>
Friends | |
class | csRef< T > |
A pointer encapsulator.
Represents a single, owned, one-time-transferable reference to an object and should be used only as the return value of a function, or when creating a brand new object which is assigned directly to a csRef<>. csPtr<> simply stores the pointer (it never invokes IncRef() or DecRef()). It is very specialized, and exists solely as a mechanism for transferring an existing reference into a csRef<>.
Important: There is only one valid way to use the result of a function which returns a csPtr<>: assign it to a csRef<>.