CXAutoReferenceNoNull
From cxwiki
The CXAutoReferenceNoNull templated class allows reference-counted objects to be passed around while automatically maintaining the correct reference count. This is a very simple and powerful tool to use for resource management. The referenced object must expose a specific reference counting interface- typically this is achieved by inheriting from DynamicReferenceCount but other techniques are permitted.
CXAutoReferenceNoNull<T> is designed to act in a manner syntactically equivalent to T* __nonnull where possible.
CXAutoReferenceNoNull<T> is syntactically equivalent to CXAutoReference<T> with the exception that is not valid to assign a nullptr value. Where possible, this is enforced at compile time. Where not possible, runtime assertions are provided.