Lua 5.1 equivalent to lua_setgcthreshold

After upgrading my lua version from 5.0 to 5.1 I get lua_setgcthreshold was not declared in this scope

With lua 5.0 everything works fine.

In lua 5.0, lua_setgcthreshold declared as follows:

 LUA_API void lua_setgcthreshold (lua_State *L, int newthreshold); 

But in 5.1 I cannot find an equivalent for this. Can anybody help me?

+5
source share
1 answer

Depending on your situation, the Lua function collectgarbage function may be useful to you. See: http://luatut.com/collectgarbage.html

0
source

Source: https://habr.com/ru/post/1234553/


All Articles