Fix leaking of ui object in textdocumentsettings