Skip to content
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

Release buffer #6976

Merged
merged 1 commit into from Mar 2, 2023
Merged

Release buffer #6976

merged 1 commit into from Mar 2, 2023

Conversation

radarhere
Copy link
Member

Sequel to #6974, addressing #6974 (comment)

I think this is missing a call to PyBuffer_Release().

This makes sense, as per https://docs.python.org/3/c-api/buffer.html

There are two ways for a consumer of the buffer interface to acquire a buffer over a target object:

In both cases, PyBuffer_Release() must be called when the buffer isn’t needed anymore. Failure to do so could lead to various issues such as resource leaks.

@hugovk hugovk merged commit 6ca7bcc into python-pillow:main Mar 2, 2023
@radarhere radarhere deleted the memoryview branch March 2, 2023 10:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants