+ if (priv->device) {
+ MODEST_DEBUG_VERIFY_OBJECT_LAST_REF(priv->device,"");
+ g_object_unref (G_OBJECT(priv->device));
+ priv->device = NULL;
+ }
+
+ if (priv->platform_fact) {
+ MODEST_DEBUG_VERIFY_OBJECT_LAST_REF(priv->platform_fact,"");
+ g_object_unref (G_OBJECT(priv->platform_fact));
+ priv->platform_fact = NULL;
+ }
+
+ if (priv->email_clipboard) {
+ MODEST_DEBUG_VERIFY_OBJECT_LAST_REF(priv->email_clipboard,"");
+ g_object_unref (G_OBJECT(priv->email_clipboard));
+ priv->email_clipboard = NULL;
+ }
+
+ if (priv->plugin_factory) {
+ MODEST_DEBUG_VERIFY_OBJECT_LAST_REF(priv->plugin_factory,"");
+ g_object_unref (G_OBJECT(priv->plugin_factory));
+ priv->plugin_factory = NULL;
+ }
+
+ if (priv->protocol_registry) {
+ MODEST_DEBUG_VERIFY_OBJECT_LAST_REF(priv->protocol_registry,"");
+ g_object_unref (G_OBJECT(priv->protocol_registry));
+ priv->protocol_registry = 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()). */
+ if (priv->account_mgr) {
+ MODEST_DEBUG_VERIFY_OBJECT_LAST_REF(priv->account_mgr,"");
+ g_object_unref (G_OBJECT(priv->account_mgr));
+ priv->account_mgr = NULL;
+ }
+
+ if (priv->conf) {
+ MODEST_DEBUG_VERIFY_OBJECT_LAST_REF(priv->conf,"");
+ g_object_unref (G_OBJECT(priv->conf));
+ priv->conf = NULL;