Skip to content

Release buffer#6976

Merged
hugovk merged 1 commit intopython-pillow:mainfrom
radarhere:memoryview
Mar 2, 2023
Merged

Release buffer#6976
hugovk merged 1 commit intopython-pillow:mainfrom
radarhere:memoryview

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.

2 participants