sys.getrefcount continuation

后端 未结 3 503
时光说笑
时光说笑 2021-01-07 12:53

link text

I got the concept of reference count

So when i do a \"del astrd\" ,reference count drops to zero and astrd gets collected by gc ?

This is t

3条回答
  •  暖寄归人
    2021-01-07 13:40

    It gets a chance to get collected on the next GC collection run.

    See: http://docs.python.org/library/gc.html

提交回复
热议问题