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:
@@ -6,6 +6,7 @@
|
|||||||
|
|
||||||
#include <Referenceable.h>
|
#include <Referenceable.h>
|
||||||
|
|
||||||
|
#include <debugger.h>
|
||||||
|
|
||||||
//#define TRACE_REFERENCEABLE
|
//#define TRACE_REFERENCEABLE
|
||||||
#ifdef TRACE_REFERENCEABLE
|
#ifdef TRACE_REFERENCEABLE
|
||||||
@@ -25,6 +26,10 @@ BReferenceable::BReferenceable()
|
|||||||
|
|
||||||
BReferenceable::~BReferenceable()
|
BReferenceable::~BReferenceable()
|
||||||
{
|
{
|
||||||
|
#ifdef DEBUG
|
||||||
|
if (fReferenceCount > 1)
|
||||||
|
debugger("Deleted object which still had references.\n");
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user