35 #ifndef __EST_HANDLABLE_H__
36 #define __EST_HANDLABLE_H__
61 # define NOT_REFCOUNTED (INT_MAX)
65 int refcount(
void)
const {
return p_refcount;}
67 void start_refcounting(
int initial=0) {p_refcount=initial;}
68 void inc_refcount(
void) {
if (p_refcount!=NOT_REFCOUNTED) p_refcount++;}
69 void dec_refcount(
void) {
if (p_refcount!=NOT_REFCOUNTED) p_refcount--;}
71 int is_unreferenced(
void)
const {
return p_refcount == 0;}
72 int is_refcounted(
void)
const {
return p_refcount!= NOT_REFCOUNTED;}
Reference Counting Interface.