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 skrah
Recipients amaury.forgeotdarc, jcea, pitrou, sbt, skrah, vstinner
Date 2012-09-18.21:19:26
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <20120918211928.GA25473@sleipnir.bytereef.org>
In-reply-to <1348001275.47.0.26214243454.issue15903@psf.upfronthosting.co.za>
Content
Richard Oudkerk <report@bugs.python.org> wrote:
> Should PyMemoryView_Release() release the _PyManagedBufferObject by doing mbuf_release(view->mbuf) even if view->mbuf->exports > 0?

No, I think it should really just be a wrapper:

diff --git a/Objects/memoryobject.c b/Objects/memoryobject.c
--- a/Objects/memoryobject.c
+++ b/Objects/memoryobject.c
@@ -1093,6 +1093,12 @@
     return memory_release((PyMemoryViewObject *)self, NULL);
 }

+PyObject *
+PyMemoryView_Release(PyObject *m)
+{
+    return memory_release((PyMemoryViewObject *)m, NULL);
+}
+

We decided in #10181 not to allow releasing a view with exports, since the
logic is already quite complex. Is there a reasonable expectation that
existing code creates memoryviews of the readinto() argument?
History
Date User Action Args
2012-09-18 21:19:27skrahsetrecipients: + skrah, jcea, amaury.forgeotdarc, pitrou, vstinner, sbt
2012-09-18 21:19:27skrahlinkissue15903 messages
2012-09-18 21:19:26skrahcreate