lua_reset {luajr} | R Documentation |
Clears out all variables from the default Lua state, freeing up the associated memory.
lua_reset()
This resets the default Lua state only. To reset a non-default
Lua state L
returned by lua_open()
, just do L <- lua_open()
again. The
memory previously used will be cleaned up at the next garbage collection.
None.
lua("a = 2")
lua_reset()
lua("print(a)") # nil