27 Star 5 Fork 56

qpy-doc-center / teedoc_with_qpydoc

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
gc.md 1.23 KB
一键复制 编辑 原始数据 按行查看 历史

gc- Control the Garbage Collector

gc module realizes the garbage collection of the memory, and subsets of the corresponding CPython module. See CPython file gc for more detailed information.

Memory Reclamation

gc.enable

gc.enable()

Enables the mechanism for automatic reclaiming memory fragments.

gc.disable

gc.disable()

Disables the mechanism for automatic reclaiming memory fragments.

gc.isenabled

gc.isenabled()

Queries whether the mechanism for automatic reclaiming memory fragments is enabled.

Return Value

  • True-The mechanism for automatic reclaiming memory fragments is enabled;

    False-The mechanism for automatic reclaiming memory fragments is disabled.

gc.collect

gc.collect()

Reclaims the memory fragments actively.

Memory Query

gc.mem_alloc

gc.mem_alloc()

Queries the applied memory size which has been applied.

Return Value

  • Returns the applied memory size. Unit: byte.

gc.mem_free

gc.mem_free()

Queries the remaining available memory size.

Return Value

  • Returns the remaining available memory size. Unit: byte.
1
https://gitee.com/qpy-doc-center/teedoc_with_qpydoc.git
git@gitee.com:qpy-doc-center/teedoc_with_qpydoc.git
qpy-doc-center
teedoc_with_qpydoc
teedoc_with_qpydoc
main

搜索帮助