Martin Panter added the comment: _CData.from_buffer() is meant to take a writable buffer, and create a “ctypes” object that shares the same memory. So it should not release the buffer until that “ctypes” object is no longer needed.
However I don’t know the insides of memoryview() objects that well so I can’t say if the hack-the-memoryview code is correct or not. ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue22896> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com