LMDThemeServices will be freed in the finalization of LMDThemes. It is restricted to the main application (not IsLibrary) what is correct when a runtime package was loaded (.bpl).
We are using dll's, they are nearly "standalone". If I unload the dll, the LMDThemeServices will not be freed, the "DeallocateHWnd(FHwnd);" will not be called, bad access violations are the results.
I changed the finalization to:
if ((not IsLibrary) or (not ModuleIsPackage)) and Assigned(ThemeService) then
This is working for me and should be correct, perhaps you can take it into the repository?