Open Habbie opened 8 months ago
the destructor should probably take g_lvgl_updatelock
, as should our construction (which we currently get away with because we construct everything before we start ticking)
I think this means we need to delete children before we delete parents, and I think this means we should represent LVGL object hierarchy as C++ object hierarchy (which, to be fair, is desirable for a lot of reasons).
via @cyclops1982 in https://github.com/voorkant/voorkant-core/pull/68#discussion_r1538110625 (and discussed in similar ways on IRC):
"it is okay if only LVGL owns a pointer to this, we currently believe that LVGL will free the object when it is cleaning up the parent"
good news: it looks like we can add this automatic destructor without changing any .cpp
bad news: https://docs.lvgl.io/8.0/overview/object.html says:
I think this means we need to delete children before we delete parents, and I think this means we should represent LVGL object hierarchy as C++ object hierarchy (which, to be fair, is desirable for a lot of reasons).