9#include <system/diagnostics/debug.h>
11#include "system/details/makeobject_leakage_detector.h"
13namespace System {
namespace Detail {
21 inline RefCount(
int value = 0)
26 inline int operator ++ ()
33 inline int operator -- ()
35 const int result = --m_count;
42 inline int operator -= (
int diff)
44 return m_count -= diff;
48 inline int get()
const
50#ifdef ASPOSE_NO_ATOMIC_REFCOUNT
53 return m_count.load();
58 inline operator int()
const
66 inline RefCount& operator = (
int value)
68#ifdef ASPOSE_NO_ATOMIC_REFCOUNT
81 return get() == value;
85#ifdef ASPOSE_NO_ATOMIC_REFCOUNT
90 std::atomic<int> m_count;
94 RefCount(
const RefCount&) =
delete;
95 RefCount& operator = (
const RefCount&) =
delete;
105inline bool operator == (
int value,
const System::Detail::RefCount &rc)
Definition: db_command.h:9
bool operator==(ArraySegment< T > a, ArraySegment< T > b)
Definition: array_segment.h:151