diff options
author | Andreas Baumann <mail@andreasbaumann.cc> | 2014-10-05 21:59:17 +0200 |
---|---|---|
committer | Andreas Baumann <mail@andreasbaumann.cc> | 2014-10-05 21:59:17 +0200 |
commit | cc6e599a52b3a062e62eb1a225c603f105e95f04 (patch) | |
tree | 468c13628ef77c1bd5194eaba142db90c54ea0f7 /src | |
parent | b577b7119aa1f57c4db7fd254c2b5b197e7451d2 (diff) | |
download | crawler-cc6e599a52b3a062e62eb1a225c603f105e95f04.tar.gz crawler-cc6e599a52b3a062e62eb1a225c603f105e95f04.tar.bz2 |
added userdata to destroy function, remembering userdata on module
initialization and passing it to destroy function
in principle the system works, a dlopen of the lua module removes
necessary functions needed during lua VM shutdown, this is due
to stack unwinding and the order objects are destroyed (should be fixable)
Diffstat (limited to 'src')
-rw-r--r-- | src/libluaglue/LuaVM.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/libluaglue/LuaVM.cpp b/src/libluaglue/LuaVM.cpp index cf8935f..d587897 100644 --- a/src/libluaglue/LuaVM.cpp +++ b/src/libluaglue/LuaVM.cpp @@ -28,6 +28,11 @@ void LuaVM::initialize( ) luaL_openlibs( m_lua ); } +void LuaVM::fullGarbageCollect( ) +{ + lua_gc( m_lua, LUA_GCCOLLECT, 0 ); +} + void LuaVM::loadSource( const char *sourceFilename ) { int res; |