Having a problem with objects, not needed any more but still having references. Result: size of allocated memory is constantly growing due to not collected objects.
How to solve this sort of problem? Is there any way to find objects with only one reference, or objects with lifetime more than some value? Or any another solution?
Using Lua 5.1 and C++ with luabind.
Thanks.
I'm not certain about integrating it with C++ but it sounds like the garbage collector isn't being given an opportunity to run.
In your lua you could try explicitly invoking it and see if that helps. There is a function in the core apis
collectgarbage(opt [, arg])
.