Python垃圾回收机制

Python GC主要使用引用计数(reference counting)来跟踪和回收垃圾。在引用计数的基础上,通过“标记-清除”(mark and sweep)解决容器对象可能产生的循环引用问题,通过“分代回收”(generation collection)以空间换时间的方法提高垃圾回收效率。发现有网友的博文已经比较清楚得阐述了这个问题,特此记录。

http://hbprotoss.github.io/posts/pythonla-ji-hui-shou-ji-zhi.html

http://blog.csdn.net/yueguanghaidao/article/details/11274737

原文地址:https://www.cnblogs.com/vincent2010/p/4780974.html