lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


I have C program that calls various Lua scripts say 10 times a second.

Question is that is it cheap to do luaL_newstate() and luaL_openlibs(L) and
call the script and then lua_close(L) each time I run my Lua script, or
shall I call luaL_newstate() and luaL_openlibs(L) at the beginning of my
application, and call lua_close(L) when I exit?

Or ... must I call luaL_newstate() and luaL_openlibs(L) before each script
call?

Thanks,
Levente