This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author amaury.forgeotdarc
Recipients amaury.forgeotdarc
Date 2008-08-28.11:00:03
SpamBayes Score 0.0003084775
Marked as misclassified No
Message-id <1219921309.45.0.320042219605.issue3712@psf.upfronthosting.co.za>
In-reply-to
Content
Two problems with memoryview:
- The buffer interface of memoryview leaks a reference:
    str(memoryview(b'text'), 'utf-8')

- memoryview does not implement tp_traverse and tp_clear, so reference
cycle cannot be collected, as with:

import gc
class MyBuf(bytes): pass

def f():
    buf = MyBuf(b'abc')
    m = memoryview(buf)
    buf.m = m
    gc.collect();gc.collect();gc.collect()

each call to f() leaks 6 references.
History
Date User Action Args
2008-08-28 11:01:49amaury.forgeotdarcsetrecipients: + amaury.forgeotdarc
2008-08-28 11:01:49amaury.forgeotdarcsetmessageid: <1219921309.45.0.320042219605.issue3712@psf.upfronthosting.co.za>
2008-08-28 11:00:03amaury.forgeotdarclinkissue3712 messages
2008-08-28 11:00:03amaury.forgeotdarccreate