Author ncoghlan
Recipients jcon, kermode, mark.dickinson, ncoghlan, petri.lehtinen, pitrou, pv, rupole, skrah, teoliphant, vstinner
Date 2011-07-06.04:07:31
SpamBayes Score 3.09302e-06
Marked as misclassified No
Message-id <1309925252.09.0.328174451902.issue10181@psf.upfronthosting.co.za>
In-reply-to
Content
If someone is calling release() on all of their views (including slices) than they won't have any problems. The only way they can get into trouble is if they have a slice or copy that they *aren't* explicitly releasing, and in that case they *already* have a problem and we're just picking it up sooner (although, in the case of CPython, refcounting will likely take care of it, just as it does for similar problems with files).

This is why I suggested that we should start exposing the source object at the Python level as an attribute of memoryview objects. Then people can decide for themselves if they want a "view-of-a-view" by slicing/copying the memoryview directly or a new, independent view by going back to the original object.
History
Date User Action Args
2011-07-06 04:07:32ncoghlansetrecipients: + ncoghlan, teoliphant, mark.dickinson, rupole, kermode, pitrou, vstinner, pv, skrah, jcon, petri.lehtinen
2011-07-06 04:07:32ncoghlansetmessageid: <1309925252.09.0.328174451902.issue10181@psf.upfronthosting.co.za>
2011-07-06 04:07:31ncoghlanlinkissue10181 messages
2011-07-06 04:07:31ncoghlancreate