43 if (m_refcount == NULL)
49 SG_SGCDEBUG(
"ref_count(): refcount %d, data %p\n", c,
this)
57 m_refcount = orig.m_refcount;
66 if (m_refcount == NULL)
71 int32_t c = m_refcount->
ref();
74 SG_SGCDEBUG(
"ref() refcount %ld data %p increased\n", c,
this)
86 if (m_refcount == NULL)
93 int32_t c = m_refcount->
unref();
98 SG_SGCDEBUG(
"unref() refcount %d data %p destroying\n", c,
this)
107 #ifdef DEBUG_SGVECTOR
108 SG_SGCDEBUG(
"unref() refcount %d data %p decreased\n", c,
this)
virtual void init_data()=0
virtual void copy_data(const SGReferencedData &orig)=0
virtual ~SGReferencedData()
SGReferencedData(bool ref_counting=true)
void copy_refcount(const SGReferencedData &orig)
virtual void free_data()=0
shogun reference count managed data
SGReferencedData & operator=(const SGReferencedData &orig)
all of classes and functions are contained in the shogun namespace