* Release reference to outbox folder when the account is
finalized. This was a reference leak.
* src/modest-runtime.c:
* Release signal handlers before singletons, as they keep
references to the send queues.
* Also fix a double reference (one leaking) on adding new
send queues to cache.
* src/modest-tny-send-queue.c:
* Finalize parent tny send queue before we unref the sentbox and
outbox, as these references are used in parent finalize.
pmo-trunk-r4737
g_debug ("%s: cleaning up", __FUNCTION__);
g_debug ("%s: cleaning up", __FUNCTION__);
+ if (_sig_handlers) {
+ modest_signal_mgr_disconnect_all_and_destroy (_sig_handlers);
+ _sig_handlers = NULL;
+ }
+
+ g_debug ("%s: cleaned up signal manager", __FUNCTION__);
+
MODEST_DEBUG_VERIFY_OBJECT_LAST_REF(_singletons,"");
g_object_unref(_singletons);
_singletons = NULL;
MODEST_DEBUG_VERIFY_OBJECT_LAST_REF(_singletons,"");
g_object_unref(_singletons);
_singletons = NULL;
g_debug ("%s: cleaned up the account store", __FUNCTION__);
g_debug ("%s: cleaned up the account store", __FUNCTION__);
- if (_sig_handlers) {
- modest_signal_mgr_disconnect_all_and_destroy (_sig_handlers);
- _sig_handlers = NULL;
- }
-
g_debug ("%s: all cleaned up", __FUNCTION__);
g_debug ("%s: all cleaned up", __FUNCTION__);
g_hash_table_insert (send_queue_cache,
g_object_ref (account),
g_hash_table_insert (send_queue_cache,
g_object_ref (account),
- g_object_ref (send_queue));
static void
modest_tny_local_folders_account_finalize (GObject *object)
{
static void
modest_tny_local_folders_account_finalize (GObject *object)
{
+ ModestTnyLocalFoldersAccountPrivate *priv;
+
+ priv = TNY_LOCAL_FOLDERS_ACCOUNT_GET_PRIVATE (object);
+ if (priv->outbox_folder) {
+ g_object_unref (priv->outbox_folder);
+ priv->outbox_folder = NULL;
+ }
G_OBJECT_CLASS (modest_tny_local_folders_account_parent_class)->finalize (object);
}
G_OBJECT_CLASS (modest_tny_local_folders_account_parent_class)->finalize (object);
}
g_queue_foreach (priv->queue, (GFunc)modest_tny_send_queue_info_free, NULL);
g_queue_free (priv->queue);
g_queue_foreach (priv->queue, (GFunc)modest_tny_send_queue_info_free, NULL);
g_queue_free (priv->queue);
+ G_OBJECT_CLASS(parent_class)->finalize (obj);
g_object_unref (priv->outbox);
g_object_unref (priv->sentbox);
g_object_unref (priv->outbox);
g_object_unref (priv->sentbox);
-
- G_OBJECT_CLASS(parent_class)->finalize (obj);