2016年12月21日

【python】python内存管理摘要

摘要: a = 1 id(a) == id(1) 每次退出ipython重新进入,这个Id都会不一样 sys.getrefcount(a) 可以计数某个对象的引用次数,是原来的次数+1 垃圾回收 使用gc包 garbage collector gc.collect() 手动垃圾回收 一般是自动垃圾回收,分配 阅读全文

posted @ 2016-12-21 16:09 yesuuu 阅读(162) 评论(0) 推荐(0) 编辑

导航