Message243920
| Author |
petr.viktorin |
| Recipients |
eric.snow, larry, ncoghlan, petr.viktorin, python-dev |
| Date |
2015年05月23日.15:20:10 |
| SpamBayes Score |
-1.0 |
| Marked as misclassified |
Yes |
| Message-id |
<1432394410.48.0.666390634825.issue24268@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
The array module is good if you *really* drop references:
$ ./python -X showrefcount
Python 3.5.0a4+ (default, May 23 2015, 16:44:38)
[GCC 4.9.2 20150212 (Red Hat 4.9.2-6)] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import sys, gc
[54618 refs, 15960 blocks]
>>> import array; del array; del sys.modules['array']; gc.collect()
6
[54851 refs, 15973 blocks]
>>> import array; del array; del sys.modules['array']; gc.collect()
6
[54851 refs, 15973 blocks]
>>> import array; del array; del sys.modules['array']; gc.collect()
6
[54851 refs, 15973 blocks]
There is a cycle between a each built-in function and its module. Modules aren't optimized for being unloaded. |
|
History
|
|---|
| Date |
User |
Action |
Args |
| 2015年05月23日 15:20:10 | petr.viktorin | set | recipients:
+ petr.viktorin, ncoghlan, larry, python-dev, eric.snow |
| 2015年05月23日 15:20:10 | petr.viktorin | set | messageid: <1432394410.48.0.666390634825.issue24268@psf.upfronthosting.co.za> |
| 2015年05月23日 15:20:10 | petr.viktorin | link | issue24268 messages |
| 2015年05月23日 15:20:10 | petr.viktorin | create |
|