Antoine Pitrou <pit...@free.fr> added the comment: > Given this explanation, of course I am +1 on an explicit release() > method. But I'm still skeptical that a context manager adds much (not > sure if that counts as -0 or +0 :-).
Ok, release() is probably enough. > I suppose after release() is called all accesses through the > memoryview object should be invalid, right? Indeed. The patch tests for that (it uses "with" to release the memoryview, but it wouldn't be hard to change it for a release() method). > Is this not covered by PEP 3118 at all? The PEP says “this memory view object holds on to the memory of base [i.e. the object the buffer was acquired from] until it is deleted”. Apparently issues pertaining to delayed garbage collection weren't raised at the time. ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue9757> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com