Message115785
> Given this explanation, of course I am +1 on an explicit release()
> method. But I'm still skeptical that a context manager adds much (not
> sure if that counts as -0 or +0 :-).
Ok, release() is probably enough.
> I suppose after release() is called all accesses through the
> memoryview object should be invalid, right?
Indeed. The patch tests for that (it uses "with" to release the
memoryview, but it wouldn't be hard to change it for a release()
method).
> Is this not covered by PEP 3118 at all?
The PEP says “this memory view object holds on to the memory of base
[i.e. the object the buffer was acquired from] until it is deleted”.
Apparently issues pertaining to delayed garbage collection weren't
raised at the time. |
|
Date |
User |
Action |
Args |
2010-09-07 15:56:27 | pitrou | set | recipients:
+ pitrou, gvanrossum, ncoghlan |
2010-09-07 15:56:25 | pitrou | link | issue9757 messages |
2010-09-07 15:56:25 | pitrou | create | |
|