E.g. the Preferences Service destructor is not called correctly (tested on Linux) with the consequence that the preferences are not saved persistently
Description
Description
Related Objects
Related Objects
- Mentioned Here
- T1850: Preferences store
Event Timeline
Comment Actions
The destruction order of objects during shutdown is totally unclear to me for now. Since people could potentially hold a smart pointer to a service object everywhere, it is always possible that this object is never released. This is of course a weakness in the design and should be corrected.
When I write preferences (outside of the preferences dialog), I always automatically call flush() to make sure my changes get written to disk (you never know if a bundle will crash the application in the next seconds...). I would suggest to communicate this as being the "proper policy" when handling preferences.
I will also add a call to flush in the workbenchs shutdown code.