+ if (priv->email_clipboard) {
+ modest_runtime_verify_object_last_ref(priv->email_clipboard,"");
+ g_object_unref (G_OBJECT(priv->email_clipboard));
+ priv->email_clipboard = NULL;
+ }
+
+ if (priv->cache_mgr) {
+ modest_runtime_verify_object_last_ref(priv->cache_mgr,"");
+ g_object_unref (G_OBJECT(priv->cache_mgr));
+ priv->cache_mgr = NULL;
+ }
+
+ if (priv->device) {
+ modest_runtime_verify_object_last_ref(priv->device,"");
+ g_object_unref (G_OBJECT(priv->device));
+ priv->device = NULL;
+ }
+
+ if (priv->platform_fact) {
+ modest_runtime_verify_object_last_ref(priv->platform_fact,"");
+ g_object_unref (G_OBJECT(priv->platform_fact));
+ priv->platform_fact = NULL;
+ }
+
+ if (priv->mail_op_queue) {
+ modest_runtime_verify_object_last_ref(priv->mail_op_queue,"");
+ g_object_unref (G_OBJECT(priv->mail_op_queue));
+ priv->mail_op_queue = NULL;
+ }
+
+ /* It is important that the account manager is uninitialized after
+ * the mail op queue is uninitialized because the mail op queue
+ * cancells any mail operations which in turn access the account
+ * manager (see modest_mail_operation_notify_end()). */