摘要:
import sys class T: pass t = T() sys.getrefcount(t) # 测量引用计数,值为2,因为本身调用要产生1个 tt =t sys.getrefcount(t) #值变为3 阅读全文
posted @ 2019-07-31 19:54
qiaoliang0302
阅读(149)
评论(0)
推荐(0)
|
摘要:
import sys class T: pass t = T() sys.getrefcount(t) # 测量引用计数,值为2,因为本身调用要产生1个 tt =t sys.getrefcount(t) #值变为3 阅读全文
posted @ 2019-07-31 19:54
qiaoliang0302
阅读(149)
评论(0)
推荐(0)
|