1 #ifndef _ReferenceCounting
2 #define _ReferenceCounting
9 #ifndef OV_USE_OLD_STL_HEADERS
20 className =
"ReferenceCounting";
21 globalID = incrementGlobalIDCounter();
22 referenceCount = uncountedReferences = 0;
26 className =
"ReferenceCounting";
27 globalID = incrementGlobalIDCounter();
28 referenceCount = uncountedReferences = 0;
33 cerr <<
"ReferenceCounting::~ReferenceCounting(): "
34 <<
"referenceCount != 0 for globalID = "
40 {
if (&x);
return *
this; }
47 {
return ++referenceCount + uncountedReferences; }
49 {
return --referenceCount + uncountedReferences; }
51 {
return referenceCount + uncountedReferences; }
53 if (!referenceCount) uncountedReferences = 1;
54 return uncountedReferences;
67 static Integer incrementGlobalIDCounter();
71 #endif // _ReferenceCounting