• Philip Chimento's avatar
    native: Use static destructor to free native modules registry · f3b84828
    Philip Chimento authored
    Valgrind shows that the string keys used to register native modules are
    leaked. (Valgrind must have gotten better at detecting this, in recent
    versions.)
    
    The simplest solution is to change the static GHashTable (which must be
    freed at end of process) to a static std::unordered_map (which will have
    its destructor called automatically at end of process.) Static
    destructors can be tricky, but the only things being freed here are
    std::string keys, so there should not be any ordering dependencies
    between this and any other static destructors.
    f3b84828
Name
Last commit
Last update
.gitlab/issue_templates Loading commit data...
doc Loading commit data...
examples Loading commit data...
gi Loading commit data...
gjs Loading commit data...
installed-tests Loading commit data...
libgjs-private Loading commit data...
m4 Loading commit data...
modules Loading commit data...
test Loading commit data...
tools Loading commit data...
util Loading commit data...
win32 Loading commit data...
.clang-format Loading commit data...
.eslintignore Loading commit data...
.eslintrc.json Loading commit data...
.gitlab-ci.yml Loading commit data...
AUTHORS Loading commit data...
CONTRIBUTING.md Loading commit data...
COPYING Loading commit data...
COPYING.LGPL Loading commit data...
CPPLINT.cfg Loading commit data...
ChangeLog Loading commit data...
Makefile-examples.am Loading commit data...
Makefile-insttest.am Loading commit data...
Makefile-modules.am Loading commit data...
Makefile-test.am Loading commit data...
Makefile.am Loading commit data...
NEWS Loading commit data...
README Loading commit data...
README.md Loading commit data...
autogen.sh Loading commit data...
configure.ac Loading commit data...
git.mk Loading commit data...
gjs-1.0.pc.in Loading commit data...
gjs-modules-srcs.mk Loading commit data...
gjs-srcs.mk Loading commit data...
gjs.doap Loading commit data...
verbump.py Loading commit data...