Skip to main content

Closing Configs

In general, it's good practice to close Config if you're only creating them temporarily so that their listeners get unregistered from the underlying storage APIs.

Example
// Create a transient config.
Config config = Config.create("MyConfig.cfg").build();

// Do stuff with it.

// Then close the config to unregister the listeners.
config.close();
Discussion

Share feedback or follow-up questions for this page directly through GitHub.