summaryrefslogtreecommitdiff
path: root/src/resources/resource.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/resources/resource.cpp')
-rw-r--r--src/resources/resource.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/resources/resource.cpp b/src/resources/resource.cpp
index 96524724b..40d44a7ec 100644
--- a/src/resources/resource.cpp
+++ b/src/resources/resource.cpp
@@ -24,6 +24,8 @@
#include "logger.h"
+#include "resources/memorycounter.h"
+#include "resources/memorymanager.h"
#include "resources/resourcemanager.h"
#include "debug.h"
@@ -68,3 +70,10 @@ void Resource::decRef()
resourceManager->release(this);
}
}
+
+int Resource::calcMemoryLocal()
+{
+ return sizeof(Resource) +
+ CAST_S32(mIdPath.size()) +
+ CAST_S32(mSource.size());
+}