Message71526
Well, this is not a bug in itself. Memoryview objects are designed to
give access to a memory area backed by another object - they don't "own"
the memory by themselves (in the sense that you e.g. own a reference to
a PyObject).
Please note by the way that the Py_buffer struct now has a reference to
the original object, the "obj" field. PyBuffer_FillInfo() will incref
it, and PyBuffer_Release() will decref it again. However, it you set
this field to NULL, you are responsible for doing your own reference
management.
I agree that it may be nice to support your use case, but I'm not sure
what the semantics should be. For clarity, perhaps it should be a
derived class of memoryview. |
|
Date |
User |
Action |
Args |
2008-08-20 09:43:18 | pitrou | set | recipients:
+ pitrou, teoliphant, rupole, benjamin.peterson |
2008-08-20 09:43:18 | pitrou | set | messageid: <1219225398.14.0.250000375695.issue3608@psf.upfronthosting.co.za> |
2008-08-20 09:43:17 | pitrou | link | issue3608 messages |
2008-08-20 09:43:16 | pitrou | create | |
|