• 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
..
atoms.cpp Loading commit data...
atoms.h Loading commit data...
byteArray.cpp Loading commit data...
byteArray.h Loading commit data...
console.cpp Loading commit data...
context-private.h Loading commit data...
context.cpp Loading commit data...
context.h Loading commit data...
coverage.cpp Loading commit data...
coverage.h Loading commit data...
debugger.cpp Loading commit data...
deprecation.cpp Loading commit data...
deprecation.h Loading commit data...
engine.cpp Loading commit data...
engine.h Loading commit data...
gjs.h Loading commit data...
gjs.stp.in Loading commit data...
global.cpp Loading commit data...
global.h Loading commit data...
importer.cpp Loading commit data...
importer.h Loading commit data...
jsapi-class.h Loading commit data...
jsapi-dynamic-class.cpp Loading commit data...
jsapi-util-args.h Loading commit data...
jsapi-util-error.cpp Loading commit data...
jsapi-util-root.h Loading commit data...
jsapi-util-string.cpp Loading commit data...
jsapi-util.cpp Loading commit data...
jsapi-util.h Loading commit data...
jsapi-wrapper.h Loading commit data...
macros.h Loading commit data...
mem-private.h Loading commit data...
mem.cpp Loading commit data...
mem.h Loading commit data...
module.cpp Loading commit data...
module.h Loading commit data...
native.cpp Loading commit data...
native.h Loading commit data...
profiler-private.h Loading commit data...
profiler.cpp Loading commit data...
profiler.h Loading commit data...
stack.cpp Loading commit data...