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 lazka
Recipients lazka
Date 2017-05-31.16:35:05
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1496248505.52.0.454625386469.issue30527@psf.upfronthosting.co.za>
In-reply-to
Content
I'm using the following code

PyObject *
get_memoryview (PyObject *self) {
    Py_buffer view;

    ...

    // this takes a ref on self
    if (PyBuffer_FillInfo (&view, self, buffer, length, 0, 0) < 0)
        return NULL;

    // this returns a <memory> object
    return PyMemoryView_FromBuffer (&view);
}

The problem is that when I call release() on the returned memory object
the buffer does not get release and as a result the exporter leaks.

Am I missing something or is this a bug?
History
Date User Action Args
2017-05-31 16:35:05lazkasetrecipients: + lazka
2017-05-31 16:35:05lazkasetmessageid: <1496248505.52.0.454625386469.issue30527@psf.upfronthosting.co.za>
2017-05-31 16:35:05lazkalinkissue30527 messages
2017-05-31 16:35:05lazkacreate