summaryrefslogtreecommitdiff
path: root/src/resources/resource.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/resources/resource.h')
-rw-r--r--src/resources/resource.h19
1 files changed, 18 insertions, 1 deletions
diff --git a/src/resources/resource.h b/src/resources/resource.h
index c4593e7fe..7196fa916 100644
--- a/src/resources/resource.h
+++ b/src/resources/resource.h
@@ -23,6 +23,8 @@
#ifndef RESOURCE_H
#define RESOURCE_H
+#include "main.h"
+
#include <ctime>
#include <string>
@@ -38,7 +40,11 @@ class Resource
* Constructor
*/
Resource(): mRefCount(0)
- { }
+ {
+#ifdef DEBUG_DUMP_LEAKS
+ mDumped = false;
+#endif
+ }
/**
* Increments the internal reference count.
@@ -66,6 +72,14 @@ class Resource
unsigned getRefCount() const
{ return mRefCount; }
+#ifdef DEBUG_DUMP_LEAKS
+ bool getDumped()
+ { return mDumped; }
+
+ void setDumped(bool n)
+ { mDumped = n; }
+#endif
+
protected:
/**
* Destructor.
@@ -77,6 +91,9 @@ class Resource
time_t mTimeStamp; /**< Time at which the resource was orphaned. */
unsigned mRefCount; /**< Reference count. */
std::string mName;
+#ifdef DEBUG_DUMP_LEAKS
+ bool mDumped;
+#endif
};
#endif