* unref the singletons *after* unref'ing modest-tny-account-store;
authorDirk-Jan C. Binnema <dirk-jan.binnema@nokia.com>
Tue, 13 Nov 2007 11:51:55 +0000 (11:51 +0000)
committerDirk-Jan C. Binnema <dirk-jan.binnema@nokia.com>
Tue, 13 Nov 2007 11:51:55 +0000 (11:51 +0000)
  thus, our object-ref bookkeeping is correct at the end
  (no more warnings for >1 refcounts for device, conf, acc_mgr)

pmo-trunk-r3720

src/modest-runtime.c

index 66e34b2..7f43703 100644 (file)
@@ -85,9 +85,6 @@ modest_runtime_uninit (void)
                return TRUE;    /* uninit maybe called if runtime_init failed */
        
        g_return_val_if_fail (MODEST_IS_SINGLETONS(_singletons), FALSE);
-       modest_runtime_verify_object_last_ref(_singletons,"");
-       g_object_unref(G_OBJECT(_singletons));
-       _singletons = NULL;
 
        if (_account_store) {
                modest_runtime_verify_object_last_ref(_account_store,"");
@@ -95,6 +92,10 @@ modest_runtime_uninit (void)
                _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);