New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
memoryview leaks references #47962
Comments
Two problems with memoryview:
import gc
class MyBuf(bytes): pass
def f():
buf = MyBuf(b'abc')
m = memoryview(buf)
buf.m = m
gc.collect();gc.collect();gc.collect() each call to f() leaks 6 references. |
Here is a patch. I feel a bit unsafe with the intended semantics of |
(I forgot to say, the patch is for the first problem only) |
Here is an aggregate patch addressing both problems. Please review. |
I think the patch looks good. |
Fixed in r66111. |
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: