More robust plugin tracking
The following discussion from !290 (merged) should be addressed:
-
@daniels started a discussion: (+9 comments)
My thinking is more along the lines of having plugin loading pull an exported
struct weston_plugin
const data struct from the DSO, which would haveinit
(with init returning a user_data variable which is used to reference the plugin internally) andteardown
members, as well as optionally things like names and whatever. Eachweston_compositor
could then track those plugins in a list, and call teardown automatically, or plugins could call an unregister function at any time which would remove them from the list.That would remove the requirement for plugins to set their own teardown listener.