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 memory leak and slowing down when video output is enabled #158

Merged
merged 1 commit into from
Dec 16, 2023

Conversation

hanzi
Copy link
Collaborator

@hanzi hanzi commented Dec 16, 2023

It seems that when video output is enabled, the old image element does not get removed from the canvas, so they sort of stack.

And while the actual image data is removed each frame, Tk is probably still trying to render all previous frames on top of each other, which is obviously not optimal.

This might fix it. (Edit: Have been running it like that for half an hour and memory consumption hasn't changed at all, so that seems to be an improvement.)

@hanzi hanzi requested a review from 40Cakes December 16, 2023 18:02
@hanzi hanzi marked this pull request as ready for review December 16, 2023 18:35
@40Cakes 40Cakes merged commit a9f64ab into 40Cakes:main Dec 16, 2023
1 check passed
@hanzi hanzi deleted the video-memory-leak branch January 7, 2024 22:14
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