diff options
author | Andrei Karas <akaras@inbox.ru> | 2016-04-21 14:07:11 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2016-04-22 00:00:06 +0300 |
commit | 9ca479839b3a5fc7dbe75e94e15a0dd6da21bf16 (patch) | |
tree | 4aa2d89a08f00cad31d417ea790a4aa5a3455cde /src/resources/resource.h | |
parent | 20727e946194e9bf984fc9b4dd7687a59fc82fc1 (diff) | |
download | plus-9ca479839b3a5fc7dbe75e94e15a0dd6da21bf16.tar.gz plus-9ca479839b3a5fc7dbe75e94e15a0dd6da21bf16.tar.bz2 plus-9ca479839b3a5fc7dbe75e94e15a0dd6da21bf16.tar.xz plus-9ca479839b3a5fc7dbe75e94e15a0dd6da21bf16.zip |
Add memorycounter interface. Impliment it in Image.
Diffstat (limited to 'src/resources/resource.h')
-rw-r--r-- | src/resources/resource.h | 7 |
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; } |