Skip to content

wadamesh beta_87

Pre-release
Pre-release

Choose a tag to compare

@B0N3-GD B0N3-GD released this 03 Oct 18:04
· 24 commits to main since this release

Test build. Stable is beta_85.

Flash it at flasher.wadamesh.com (switch the toggle to Beta), or update on the device if you have "Get test builds (beta)" turned on.

Two fixes for Lua apps and nothing else. If you do not write or run apps, this is the same firmware as beta_86 and there is no reason to rush.

A memory leak in Lua apps

Apps leaked memory every time they redrew a screen, and the more the screen had on it the faster it went.

Clearing a page destroyed the buttons and list rows but kept the code attached to each one. The callbacks live in a table keyed by the widget's address, and nothing removed the entries when the widgets were freed, so an app rebuilding a list of twenty contacts left twenty closures behind on every redraw, each holding whatever it had captured. Nothing ever took them out, so an app ran until it could not allocate and then failed to build a screen.

Clearing a page now releases those callbacks along with the widgets they belong to. Every entry in that table describes a widget that has just been destroyed, so there is nothing in it worth keeping.

It could also have made a button do the wrong thing. Addresses get reused, so a new button created with nothing attached to it could land on an address a dead one had left behind and run that instead on the next tap. That cannot happen now that nothing is left behind.

Reported by Jade while writing a one-time-pad app. If you have seen an app get slower, or start failing to draw, the longer it ran, this is why.

wada.ui.emoji(cb)

Opens the emoji picker and gives you the chosen glyph back as UTF-8, or nil if it was dismissed.

This is for an app that draws its own text entry and keeps the buffer itself. If you use wada.ui.input() you do not need it: beta_86 put the picker on that field's long-press menu already, beside Cut, Copy, Paste and Sym. The distinction matters because an app with its own composer has no textarea to long-press, which is exactly the case this was asked for.

Documented at wadamesh.com/sdk.html.