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

Small memory leak when opening image with nclx color profile #64

Closed
bigcat88 opened this issue Dec 25, 2022 · 0 comments · Fixed by #66
Closed

Small memory leak when opening image with nclx color profile #64

bigcat88 opened this issue Dec 25, 2022 · 0 comments · Fixed by #66
Assignees
Labels
bug Something isn't working fixed Fixed in last version

Comments

@bigcat88
Copy link
Owner

bigcat88 commented Dec 25, 2022

Did not find the function call heif_nclx_color_profile_free in the sources, look like i missed it. :(

    im_heif = pillow_heif.open_heif("../tests/images/heif_other/cat.hif")  # from this repo
    for i in range(10000000):
        nclx = pillow_heif.private.read_color_profile(im_heif[0]._handle)

Eats 500mb of RAM at the end... ~60 bytes for each opening of image with nclx profile.

Affected Versions: This leak is present in all versions. Will add test for this...

@bigcat88 bigcat88 added the bug Something isn't working label Dec 25, 2022
@bigcat88 bigcat88 self-assigned this Dec 25, 2022
@bigcat88 bigcat88 added the fixed in upcoming release fix will arrive with next release label Dec 27, 2022
bigcat88 added a commit that referenced this issue Dec 28, 2022
* Adds support for read nclx values and fixes #64

* CI & CD: trigger push analyze only on main branch
@bigcat88 bigcat88 added fixed Fixed in last version and removed fixed in upcoming release fix will arrive with next release labels Feb 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working fixed Fixed in last version
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant