加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
collectgarbage函数说明.txt 904 Bytes
一键复制 编辑 原始数据 按行查看 历史
chenhlb 提交于 2017-10-31 15:13 . d
collectgarbage (opt [, arg])
This function is a generic interface to the garbage collector.
It performs different functions according to its first argument, opt:
"stop": stops the garbage collector. 禁用垃圾收集器
"restart": restarts the garbage collector. 重启垃圾收集器
"collect": performs a full garbage-collection cycle. 完全垃圾收集
"count": returns the total memory in use by Lua (in Kbytes). 查询内存占用(Kb)
"step": performs a garbage-collection step.
The step "size" is controlled by arg
(larger values mean more steps) in a non-specified way.
If you want to control the step size you
must experimentally tune the value of arg.
Returns true if the step finished a collection cycle.
"setpause": sets arg/100 as the new value for the pause of the collector. 垃圾收集中断量
"setstepmul": sets arg/100 as the new value for the step multiplier of the collector. 垃圾收集工作量
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化