Some memory usage improvements to daemon.
[jenirok] / src / common / contactmanager.cpp
index 0a49a7c..c2e886f 100644 (file)
@@ -54,6 +54,8 @@ bool ContactManager::numberExists(QString const& number)
         return false;
     }
 
+    e_book_query_unref(query);
+
     if (g_contacts == 0)
     {
         qDebug() << "no contacts";
@@ -112,23 +114,17 @@ bool ContactManager::load()
         return true;
     }
 
-    qDebug() << "Loading addressbook";
-
     GError *error;
     error = 0;
     book_ = e_book_new_system_addressbook(&error);
 
-    qDebug() << "Loaded almost";
-
     if (!book_)
     {
-        qDebug() << "Couldn't open addressbook: %s" <<  error->message;
+        qDebug() << "Couldn't open addressbook: %s" << error->message;
         g_error_free(error);
         return false;
     }
 
-    qDebug() << "Addressbook loaded";
-
     /* Open connection to the address book */
     if (!e_book_open(book_, FALSE, &error))
     {
@@ -137,8 +133,6 @@ bool ContactManager::load()
         return false;
     }
 
-    qDebug() << "Addressbook opened";
-
     return true;
 
 }