diff options
author | Philip Chimento <philip.chimento@gmail.com> | 2018-12-21 10:51:22 -0700 |
---|---|---|
committer | Philip Chimento <philip.chimento@gmail.com> | 2018-12-22 16:08:05 -0700 |
commit | 8055d94eb0b6162b9b66dd79488e62d6b97e231a (patch) | |
tree | 5c81fa0cb160ff46f8c35546eeae4ac5a8a460bb /gjs/module.cpp | |
parent | f87e0b60ef55e3c193fc09f15e2f3dd55087fee5 (diff) | |
download | gjs-8055d94eb0b6162b9b66dd79488e62d6b97e231a.tar.gz |
module: Add memory counters
This adds memory counters for module objects, similar to all the other
JS objects that have their own private structures.
Diffstat (limited to 'gjs/module.cpp')
-rw-r--r-- | gjs/module.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/gjs/module.cpp b/gjs/module.cpp index ff180f37..258d9b1e 100644 --- a/gjs/module.cpp +++ b/gjs/module.cpp @@ -27,6 +27,7 @@ #include <gio/gio.h> #include "gjs/context-private.h" +#include "gjs/mem-private.h" #include "jsapi-util.h" #include "jsapi-wrapper.h" #include "module.h" @@ -38,11 +39,13 @@ class GjsModule { GjsModule(const char *name) { m_name = g_strdup(name); + GJS_INC_COUNTER(module); } ~GjsModule() { g_free(m_name); + GJS_DEC_COUNTER(module); } /* Private data accessors */ |