Tracking issue for proper memory management, dropping, and threading #140
Labels
bug
Something isn't working
enhancement
New feature or request
help wanted
Extra attention is needed
meta
Tracking other issues or pull requests
question
Further information is requested
The situation
We need to figure out a way to destroy all LVGL primitives in a safe way and synchronise access across threads. The issue in detail was outlined in this excellent writeup and the following discussion, but to summarise the current state of affairs:
Obj
types and all extensions thereof i.e. all widgets are never dropped;Obj
types as reference-counted values, or placing access to LVGL overall behind a global lock, may have considerable performance downsides;Obj
instances point to the same underlying LVGLlv_obj_t
, and care must be taken with dropping these.Unanswered questions
alloc
and massive performance penalties?LvManaged<T>: Send + Sync where T: Widget
?To-do
Arc<T>
ing widget types and locking the LVGL API;Relevant PRs/issues:
Style
s are dropped after being assigned #110Screen
s and associated memory leaks #111<T as NativeObject>::raw()
infallible,Obj
storeNonNull
pointers #143Obj
and related on drop #144The text was updated successfully, but these errors were encountered: