Message71146
| Author |
pitrou |
| Recipients |
amaury.forgeotdarc, barry, benjamin.peterson, donmez, gpolo, lemburg, loewis, pitrou, teoliphant |
| Date |
2008年08月14日.19:33:52 |
| SpamBayes Score |
0.0031445706 |
| Marked as misclassified |
No |
| Message-id |
<1218742433.69.0.60120834408.issue3139@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
Sorry, the roundup e-mail interface ate some lines of code:
>>> b = b''
>>> sys.getrefcount(b)
30
>>> m = memoryview(b)
>>> sys.getrefcount(b)
32
>>> del m
>>> sys.getrefcount(b)
31
It doesn't happen with bytearrays, so I suspect it's that you only
DECREF when releasebuffer method exists:
>>> b = bytearray()
>>> sys.getrefcount(b)
2
>>> m = memoryview(b)
>>> sys.getrefcount(b)
4
>>> del m
>>> sys.getrefcount(b)
2 |
|