portapack-mayhem / mayhem-firmware

Custom firmware for the HackRF+PortaPack H1/H2
GNU General Public License v3.0
3.22k stars 530 forks source link

Deallocate menu buttons to save memory #1971

Closed NotherNgineer closed 5 months ago

NotherNgineer commented 5 months ago

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 commented 5 months ago

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