On Wed, 17 Dec 2014 12:39:21 +0100
Thomas Jericke <tjericke@indel.ch> wrote:
Depends on the usecase. Normally I would call luaL_newstate only once.
And then run all the scripts in the same state. Now there is one
issue here, if your scripts use globals you need to ensure that you
don't have any conflicts.
Thanks for the answer. Yes, I set global variables each time I call my
scripts. Shall I call lua_settop(L, 0) before any stack operation, and then
let the garbage collector do the right thing?
Thanks again,
Levente