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

Clean up PNG and JPEG encoding properly #1863

Merged
merged 1 commit into from
Nov 19, 2024

Conversation

barisyild
Copy link
Contributor

@barisyild barisyild commented Nov 15, 2024

This commit fixes PNG/JPEG encoding memory leak.

Reproduce:

var bitmapData:BitmapData = new BitmapData(1, 1, true, 0x00000000);

openfl.Lib.setInterval(() -> {
    for(i in 0...100)
    {
        bitmapData.encode(bitmapData.rect, new PNGEncoderOptions());
    }

    openfl.system.System.gc();
}, 100);

Fixes #1860

@dimensionscape
Copy link
Member

Looks fine to me.

@joshtynjala joshtynjala merged commit c0e1a1b into openfl:develop Nov 19, 2024
26 checks passed
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.

PNGEncode memory leak
3 participants