any resource allocated by the Bela backend is already taken care of. cleanup()
is to give the user a chance to release memory and resources they allocated in setup()
. For instance, if you call open()
on a file descriptor in setup()
, and read()
and/or write()
to it from render()
, you will want to call close()
it in cleanup()
. Most Bela examples don't allocate any resources or memory in setup()
and therefore do not need to release them in cleanup()
.