Ok, here's a problem I'm having.
I have Lua bindings to a rendering engine that has an internal render manager that keeps its own track of pointers for the render scene and manages them. The problem is that when I'm using it from Lua, if i don't keep a Lua reference to every single object i add to the C++ render manager, it starts to garbage collect the pointers and of course cause things to crash. I don't particularly want to have to save every single reference to every single thing i create. Is there a way to force Lua to not garbage collect certain things? Are there any other ways I can get around this problem?
I'm generating the Lua bindings with SWIG.