summaryrefslogtreecommitdiff
path: root/pmt/src/lib/pmt_int.h
diff options
context:
space:
mode:
Diffstat (limited to 'pmt/src/lib/pmt_int.h')
-rw-r--r--pmt/src/lib/pmt_int.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/pmt/src/lib/pmt_int.h b/pmt/src/lib/pmt_int.h
index a973d30d9e..af22d45159 100644
--- a/pmt/src/lib/pmt_int.h
+++ b/pmt/src/lib/pmt_int.h
@@ -34,8 +34,10 @@
#define PMT_LOCAL_ALLOCATOR 0 // define to 0 or 1
class pmt_base : boost::noncopyable {
+ mutable boost::detail::atomic_count count_;
+
protected:
- pmt_base(){};
+ pmt_base() : count_(0) {};
virtual ~pmt_base();
public:
@@ -65,6 +67,9 @@ public:
virtual bool is_c32vector() const { return false; }
virtual bool is_c64vector() const { return false; }
+ friend void intrusive_ptr_add_ref(pmt_base* p);
+ friend void intrusive_ptr_release(pmt_base* p);
+
# if (PMT_LOCAL_ALLOCATOR)
void *operator new(size_t);
void operator delete(void *, size_t);