Open GoogleCodeExporter opened 9 years ago
ps:In lua class,we add a ManualGC() method to release reference which is not
marked in ObjectTranslator.objects and ObjectTranslator.objectsBackMap
Original comment by isSin...@gmail.com
on 17 Jul 2010 at 3:01
i think the bug is in the callFunction method in lua object
as it pushes the values but never pops them off when done
Original comment by icewolfz...@gmail.com
on 18 Jul 2010 at 6:16
i added
public void GC()
{
LuaDLL.lua_gc(luaState, LuaGCOptions.LUA_GCCOLLECT, 0);
}
to lua class, you can then do Lua.GC() and force garbarge collection.
now this wont get every thing as object could still be in use by lua or such
but i added to the callMethod just ebfore returning and it cleans yup some
objects, but could slow down possibly, best bet if you are concerned is call
the GC method your self after all your code is executed and it should clean up
memeory.
Original comment by icewolfz...@gmail.com
on 22 Jul 2010 at 7:05
We came across a similar issue recently, after some memory profiling I
discovered LuaBase was keeping a reference to _Interpreter after Dispose had
been called which seemed to be keeping some objects alive seemingly forever.
LuaBase is inherited from in quite a few places and I haven't done a lot of
testing, see attached for a patch.
If someone can review and verify it hasn't broken anything I'll commit it in.
Original comment by capre...@gmail.com
on 13 Aug 2010 at 6:46
Attachments:
Original issue reported on code.google.com by
isSin...@gmail.com
on 17 Jul 2010 at 2:58