SCIM_DEBUG_FRONTEND(2) << " Releasing Config...\n";
_config.reset ();
_config_connection.disconnect ();
-
+ ConfigBase::set (0);
+ ConfigBase::unload ();
_focused_ic = NULL;
_ic_list = NULL;
return _scim_default_config;
}
+void
+ConfigBase::unload ()
+{
+ _scim_default_config_module.unload ();
+}
+
/*
* Implementation of DummyConfig
*/
*/
static ConfigPointer get (bool create_on_demand = true,
const String &default_module = String (""));
+ /**
+ * @brief Unload the default global Config module.
+ *
+ * If global Config object is used by calling function ConfigBase::get
+ * ConfigBase::unload is needed before exit.
+ */
+ static void unload ();
};
/**
}
bool
+ConfigModule::unload ()
+{
+ return m_module.unload ();
+}
+
+bool
ConfigModule::valid () const
{
return (m_module.valid () && m_config_init && m_config_create_config);
bool load (const String &name);
/**
+ * @brief Unload the config Module.
+ * @return true if sucessfully unloaded.
+ */
+ bool unload ();
+
+ /**
* @brief Check if a module is loaded and initialized successfully.
* @return true if a module is already loaded and initialized successfully.
*/
if (!config_pointer.null ())
config_pointer.reset ();
ConfigBase::set (0);
+ ConfigBase::unload ();
snprintf (buf, sizeof (buf), "time:%ld pid:%d %s %s Helper ISE (%s) is destroyed!!!\n",
time (0), getpid (), __FILE__, __func__, uuid.c_str ());
isf_save_log (buf);