Name

RefCounted — Objects eligible for intrusive refcounting should inherit from this class.

Synopsis

class RefCounted {
public:
  // construct/copy/destruct
  RefCounted();
  RefCounted(const RefCounted &);
  ~RefCounted();

  // public member functions

  int decRefCnt() const;
  void incRefCnt() const;
  int getRefCnt() const;
};

Description

RefCntPtr uses the interface of this class.

RefCounted construct/copy/destruct

  1. RefCounted();


  2. RefCounted(const RefCounted & );


  3. ~RefCounted();


RefCounted public member functions

  1. int decRefCnt() const;

    Decrement reference counter & return new value.


  2. void incRefCnt() const;

    Increment reference counter.


  3. int getRefCnt() const;

    Return ref counter's value.