Removed the osg::Referenced::createCount() and deleteCount() methods and

associated variables which were only compiled in on debug build.  These optional
methods/static vars were causingproblems when mixing debug and release builds.
This commit is contained in:
Robert Osfield
2003-01-17 14:11:34 +00:00
parent 63fe1433bb
commit c406d2476f
3 changed files with 1 additions and 44 deletions

View File

@@ -23,15 +23,9 @@ class SG_EXPORT Referenced
{
_refCount=0;
#ifdef OSG_COMPILE_UNIT_TESTS
_createdCount ++;
#endif
}
Referenced(const Referenced&) {
_refCount=0;
#ifdef OSG_COMPILE_UNIT_TESTS
_createdCount ++;
#endif
}
inline Referenced& operator = (Referenced&) { return *this; }
@@ -67,26 +61,11 @@ class SG_EXPORT Referenced
/** return the number pointers currently referencing this object. */
inline int referenceCount() const { return _refCount; }
#ifdef OSG_COMPILE_UNIT_TESTS
/** return the total number of created referenced objects */
inline static int createdCount() { return _createdCount; }
/** return the total number of deleted referenced objects */
inline static int deletedCount() { return _deletedCount; }
#endif
protected:
virtual ~Referenced();
mutable int _refCount;
#ifdef OSG_COMPILE_UNIT_TESTS
static int _createdCount; // incremented in the constructor
static int _deletedCount; // incremented in the destructor
#endif
};