Tuesday, October 5, 2010

gc

这是 python 的 garbage collection 的接口,Java 其实也有,放在 java.lang.Runtime.gc()。

gc 模块主要提供了以下方法:
  • enable() 和 disable() 用于打开和关闭自动 gc 功能;
  • collect() 用于主动调用 gc;
  • get_count 和 get_shreshold 获得 gc 的基本信息;
  • get_referrers 与 get_referents 获得对象的引用和被引用;

No comments:

Post a Comment