摘要:
import sys class T: pass t = T() sys.getrefcount(t) # 测量引用计数,值为2,因为本身调用要产生1个 tt =t sys.getrefcount(t) #值变为3 阅读全文
摘要:
import sys class T: pass t = T() sys.getrefcount(t) # 测量引用计数,值为2,因为本身调用要产生1个 tt =t sys.getrefcount(t) #值变为3 阅读全文
|