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

Fix image memory leaks in native code #31

Merged
merged 2 commits into from
Dec 19, 2024

Conversation

roblillack
Copy link
Owner

This PR fixes a memory leak when updating a ui.Image's content. Weirdly enough, the very same memory leak existed in native code for the Cocoa and the FLTK backend. For Cocoa, we can fix it directly, for FLTK we cannot easily, as currently, there's no way to read the reference to a goFltk.RgbImage from a goFltk.Box, so the native implementation will be a wrapper about a Box and Image, in order for us to keep a reference to the image we might want to Destroy() after replacing it.

Ticket: #30

@roblillack roblillack merged commit c3aafee into main Dec 19, 2024
2 checks passed
roblillack added a commit that referenced this pull request Dec 19, 2024
@roblillack roblillack deleted the 30-fix-image-memory-leaks-in-native-code branch December 19, 2024 08:17
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.

1 participant