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

Deallocate menu buttons to save memory #1971

Merged
merged 4 commits into from
Mar 10, 2024

Conversation

NotherNgineer
Copy link
Contributor

@NotherNgineer NotherNgineer commented Mar 10, 2024

Code from @u-foka to deallocate memory for menu buttons that are not currently visible on the screen (i.e. when opening a sub-menu or an app), as suggested in issue #1914.

(Each menu button consumes about 300 bytes, so deallocating 10 of them, for example, saves about 3KB.)

Thanks to @u-foka.

Test version here:
https://discord.com/channels/719669764804444213/722101917135798312/1216473993113112636

@NotherNgineer NotherNgineer marked this pull request as ready for review March 10, 2024 19:35
Copy link
Member

@gullradriel gullradriel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good to go, thanks @NotherNgineer and @u-foka

@gullradriel gullradriel merged commit e9b9ba4 into portapack-mayhem:next Mar 10, 2024
3 checks passed
@NotherNgineer NotherNgineer deleted the memory-save branch March 10, 2024 23:13
@NotherNgineer
Copy link
Contributor Author

NotherNgineer commented Mar 13, 2024

The Capture app hangs frequently starting with nightly n_240311. This PR is the most likely cause. @u-foka FYI.

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