Add some additional BReferenceable debugging.

- When libbe is built in debug mode, BReferenceable now issues a
  debugger call if it's destroyed without all references having been
  released.
This commit is contained in:
Rene Gollent
2012-12-04 21:17:30 -05:00
parent e402c5e0be
commit 860c710c4b
+5
View File
@@ -6,6 +6,7 @@
#include <Referenceable.h>
#include <debugger.h>
//#define TRACE_REFERENCEABLE
#ifdef TRACE_REFERENCEABLE
@@ -25,6 +26,10 @@ BReferenceable::BReferenceable()
BReferenceable::~BReferenceable()
{
#ifdef DEBUG
if (fReferenceCount > 1)
debugger("Deleted object which still had references.\n");
#endif
}