// The StorageManager creates a thread pool (through TaskMaster)
// which isn't closed automatically
StorageManager storageManager = CoreRegistry.get(StorageManager.class);
if (storageManager != null) {
storageManager.finishSavingAndShutdown();
}
CoreRegistry.clear();
super.close();