• Remove the threads_enter/leave calls; they are not needed, given that
the code between init() and main() is single threaded.
• Ensure that the idle callbacks are inserted with the right priority,
to avoid updating the UI after the data has been freed.
The example code that is meant to be XIncluded into the API reference
should not be part of the interactive test suite: it's code that it is
meant to be used as a reference implementation - whereas the interactive
test suite should be allowed to be lean and test behaviour even in nasty
ways. In short: the test suite should not be the place where we show off
idiomatic code for educational purposes.