diff --git a/core/src/main/java/com/github/weisj/darklaf/LafManager.java b/core/src/main/java/com/github/weisj/darklaf/LafManager.java index 6f1917709..9515453ca 100644 --- a/core/src/main/java/com/github/weisj/darklaf/LafManager.java +++ b/core/src/main/java/com/github/weisj/darklaf/LafManager.java @@ -124,9 +124,9 @@ public static void setDecorationsEnabled(final boolean enabled) { * {@link ThemePreferenceListener}s. On some platforms this setting may do nothing. * *

- * Warning: If preference reporting is enabled it needs to be disabled before closing the - * program. Not doing so can result in memory leaks and prevent the classloader from being garbage - * collected. + * Warning: If preference reporting is enabled it needs to be disabled for the classloader to + * be eligible for garbage collection. This is only relevant if you actually need the classloader to + * be unloaded. * * @param enabled true if changes should be reported. */ diff --git a/platform-preferences/src/main/java/com/github/weisj/darklaf/platform/preferences/SystemPreferencesManager.java b/platform-preferences/src/main/java/com/github/weisj/darklaf/platform/preferences/SystemPreferencesManager.java index da9f42812..b8a231e76 100644 --- a/platform-preferences/src/main/java/com/github/weisj/darklaf/platform/preferences/SystemPreferencesManager.java +++ b/platform-preferences/src/main/java/com/github/weisj/darklaf/platform/preferences/SystemPreferencesManager.java @@ -83,6 +83,17 @@ private static ThemePreferenceProvider createProvider(final boolean allowNativeR return nativeProvider; } + /** + * Enabled whether changes in the preferred theme style should be reported to + * {@link SystemPreferenceChangeListener}s. On some platforms this setting may do nothing. + * + *

+ * Warning: If preference reporting is enabled it needs to be disabled for the classloader to + * be eligible for garbage collection. This is only relevant if you actually need the classloader to + * be unloaded. + * + * @param reportingEnabled true if changes should be reported. + */ public void enableReporting(final boolean reportingEnabled) { if (isReportingEnabled() != reportingEnabled) { preferenceProvider.setReporting(reportingEnabled);