python对象销毁(垃圾回收)

引用计数器

循环垃圾收集器: 作为引用计数的补充, 垃圾收集器也会留心被分配的总量很大(及未通过引用计数销毁的那些)的对象。 在这种情况下, 解释器会暂停下来, 试图清理所有未引用的循环。

解释器

 

Reference Count=0

Circular reference a reference to b, b reference  to a. Reference Count =1

 

posted @ 2018-01-19 13:38  thisissweetcandy  阅读(57)  评论(0)    收藏  举报