summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2023-07-09 21:00:27 +0300
committerGeorge Hazan <george.hazan@gmail.com>2023-07-09 21:00:27 +0300
commit6872262b3619b07418092be5a7689c8c195282a2 (patch)
treea666a85b8f5eafb34a9dc17d76114573b512fdce /include
parent8da4a50fd56cd6b2ffc84c307cb6385ba6e1dd9a (diff)
MShareable - dirty crutch instead of using std::shared_ptr, which is incompatible with Miranda's core
Diffstat (limited to 'include')
-rw-r--r--include/m_system.h17
1 files changed, 17 insertions, 0 deletions
diff --git a/include/m_system.h b/include/m_system.h
index affe7bfa25..6c2fc6e5b5 100644
--- a/include/m_system.h
+++ b/include/m_system.h
@@ -257,6 +257,23 @@ public:
};
///////////////////////////////////////////////////////////////////////////////
+// basic class for classes with usage counter
+
+class MIR_CORE_EXPORT MShareable : public MNonCopyable
+{
+ unsigned volatile m_iUseCount;
+
+protected:
+ MShareable();
+ virtual ~MShareable();
+
+public:
+ void Acquire();
+ void Release();
+};
+
+
+///////////////////////////////////////////////////////////////////////////////
// general lists' templates
#define NumericKeySortT -1