Lua 5.1相当于lua_setgcthreshold

Ram*_*amy 6 lua garbage-collection

更新我的lua版本后5.0,5.1 我得到一个lua_setgcthreshold was not declared in this scope

随着lua 5.0各项工作的罚款.

在lua 5.0 lua_setgcthreshold中声明如下:

LUA_API void  lua_setgcthreshold (lua_State *L, int newthreshold);
Run Code Online (Sandbox Code Playgroud)

但在5.1中我无法找到相应的.有人可以帮帮我吗?

war*_*ing 0

根据您的情况,Lua 函数collectgarbage 可能对您有用。请参阅: http: //luatut.com/collectgarbage.html