X-Git-Url: http://git.maemo.org/git/?p=modest;a=blobdiff_plain;f=src%2Fmodest-runtime.c;h=aa41989482aa1f35bac82f3a092735136f515f86;hp=7f437033a34efd5f215847368ee0c1f619cb55b4;hb=d8de27fbff3a72a581ddf32c6c868b6dd80ee4cb;hpb=a9d1306f8141535145b378e612dd427dc7ad358b diff --git a/src/modest-runtime.c b/src/modest-runtime.c index 7f43703..aa41989 100644 --- a/src/modest-runtime.c +++ b/src/modest-runtime.c @@ -46,6 +46,7 @@ #include #include #include +#include static ModestSingletons *_singletons = NULL; @@ -85,17 +86,16 @@ modest_runtime_uninit (void) return TRUE; /* uninit maybe called if runtime_init failed */ g_return_val_if_fail (MODEST_IS_SINGLETONS(_singletons), FALSE); + + MODEST_DEBUG_VERIFY_OBJECT_LAST_REF(_singletons,""); + g_object_unref(_singletons); + _singletons = NULL; if (_account_store) { - modest_runtime_verify_object_last_ref(_account_store,""); - g_object_unref(G_OBJECT(_account_store)); + MODEST_DEBUG_VERIFY_OBJECT_LAST_REF(_account_store,""); + g_object_unref(_account_store); _account_store = NULL; } - - modest_runtime_verify_object_last_ref(_singletons,""); - g_object_unref(G_OBJECT(_singletons)); - _singletons = NULL; - if (_sig_handlers) { modest_signal_mgr_disconnect_all_and_destroy (_sig_handlers); @@ -245,9 +245,10 @@ modest_runtime_get_debug_flags () static const GDebugKey debug_keys[] = { { "abort-on-warning", MODEST_RUNTIME_DEBUG_ABORT_ON_WARNING }, { "log-actions", MODEST_RUNTIME_DEBUG_LOG_ACTIONS }, - { "debug-objects", MODEST_RUNTIME_DEBUG_DEBUG_OBJECTS }, - { "debug-signals", MODEST_RUNTIME_DEBUG_DEBUG_SIGNALS }, - { "factory-settings", MODEST_RUNTIME_DEBUG_FACTORY_SETTINGS} + { "debug-objects", MODEST_RUNTIME_DEBUG_OBJECTS }, + { "debug-signals", MODEST_RUNTIME_DEBUG_SIGNALS }, + { "factory-settings", MODEST_RUNTIME_DEBUG_FACTORY_SETTINGS}, + { "debug-code", MODEST_RUNTIME_DEBUG_CODE} }; const gchar *str; static ModestRuntimeDebugFlags debug_flags = -1;