Library of Assembled Shared Sources
|
implementation of CounterPolicy concept, using a counter in the managed object itself. More...
#include <smart_ptr_policies.h>
implementation of CounterPolicy concept, using a counter in the managed object itself.
This comes from "C++ Templates, The Complete Guide" by David Vandevoorde and Nicolai M. Josuttis. See their MemberReferenceCount
policy.
The DefaultCounter policy puts the reference counter outside the managed object. That's great in most cases, because that way, the managed type doesn't have to be designed to be used with our SharedPtr. However, in some cases it is more interesting to put the reference counter inside the managed object. You can use the IntrusiveCounter policy to use such a reference counter with our SharedPtr.
Definition at line 456 of file smart_ptr_policies.h.