summaryrefslogtreecommitdiff
path: root/src/resources/resource.h
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2016-04-21 14:07:11 +0300
committerAndrei Karas <akaras@inbox.ru>2016-04-22 00:00:06 +0300
commit9ca479839b3a5fc7dbe75e94e15a0dd6da21bf16 (patch)
tree4aa2d89a08f00cad31d417ea790a4aa5a3455cde /src/resources/resource.h
parent20727e946194e9bf984fc9b4dd7687a59fc82fc1 (diff)
downloadmv-9ca479839b3a5fc7dbe75e94e15a0dd6da21bf16.tar.gz
mv-9ca479839b3a5fc7dbe75e94e15a0dd6da21bf16.tar.bz2
mv-9ca479839b3a5fc7dbe75e94e15a0dd6da21bf16.tar.xz
mv-9ca479839b3a5fc7dbe75e94e15a0dd6da21bf16.zip
Add memorycounter interface. Impliment it in Image.
Diffstat (limited to 'src/resources/resource.h')
-rw-r--r--src/resources/resource.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/resources/resource.h b/src/resources/resource.h
index e237af526..c2d3ad865 100644
--- a/src/resources/resource.h
+++ b/src/resources/resource.h
@@ -23,6 +23,8 @@
#ifndef RESOURCES_RESOURCE_H
#define RESOURCES_RESOURCE_H
+#include "resources/memorycounter.h"
+
#include <string>
#include "localconsts.h"
@@ -30,7 +32,7 @@
/**
* A generic reference counted resource object.
*/
-class Resource notfinal
+class Resource notfinal : public MemoryCounter
{
friend class ResourceManager;
@@ -39,6 +41,7 @@ class Resource notfinal
* Constructor
*/
Resource() :
+ MemoryCounter(),
mIdPath(),
mSource(),
mTimeStamp(0),
@@ -96,6 +99,8 @@ class Resource notfinal
void setNotCount(const bool b)
{ mNotCount = b; }
+ int calcMemoryLocal() override;
+
#ifdef DEBUG_DUMP_LEAKS
bool getDumped() const A_WARN_UNUSED
{ return mDumped; }