void () { ComponentWithBrowseButton<?> component = reference.get(); if (component == null) return; // component is collected Application app = ApplicationManager.getApplication(); if (app != null) { DataManager dataManager = app.getServiceIfCreated(DataManager.class); if (dataManager != null) { Disposable disposable = UI_DISPOSABLE.getData(dataManager.getDataContext(component)); if (disposable != null) { Disposer.register(disposable, component); } } } }