Template to simplify the task of writing a class that implements the reference-counting pattern.
More...
template<class Base>
class Bentley::RefCounted< Base >
Template to simplify the task of writing a class that implements the reference-counting pattern.
This template contains a complete implementation of the reference-counting pattern. If a class inherits from an instantiation of this template, the class inherits that implementation and becomes reference-counted. Example:
Or, RefCounted can be used to define a class that implements some interface, where that interface inherits from IRefCounted. For example:
struct ISomeInterface : IRefCounted {...};
struct MyClass :
RefCounted<ISomeInterface> {...};