]> Creatis software - creaImageIO.git/blobdiff - src2/creaImageIOGimmick.cpp
memory leak tracking
[creaImageIO.git] / src2 / creaImageIOGimmick.cpp
index a13809b7a8a1c885ff35590e88c6074976b4f386..e168c3769baa12b10a85243a77011076f39a6e81 100644 (file)
@@ -1,3 +1,4 @@
+
 #include <creaImageIOGimmick.h>
 
 #include <creaImageIOSystem.h>
@@ -8,13 +9,17 @@
 #  define PATH_MAX 2048
 #endif
 
+#ifdef _DEBUG
+#define new DEBUG_NEW
+#endif
+
 namespace creaImageIO
 {
   //==============================================================
   Gimmick::Gimmick()
     : mImageAdder(0)
   {    
-    RegisterGimmickMessageTypes();
+  RegisterGimmickMessageTypes();
        mSettings=0;
        mSynchronizer=0;
   }
@@ -85,18 +90,18 @@ namespace creaImageIO
                }
        }
 
-  ////////////////////////////////////////////////////////////////////////
-  // create a DB from a attributes descriptor file for medical images   //
-  // @param i_name : DB name                                           //
-  // @param i_locDesc : location of descriptor file                    //
-  // @param i_locDB : location of DB                                   //
-  // return : the SQLiteTreeHandler object on DB                       //
-       //////////////////////////////////////////////////////////////////
SQLiteTreeHandler *Gimmick::createDB(const std::string &i_name,
-                                     const std::string &i_locDesc,
-                                     const std::string &i_locDB)
+  ///////////////////////////////////////////////////////////////////////////
+  // create a DB from a attributes descriptor file for medical images      //
+  // @param i_name : DB name                                                                                      //
+  // @param i_locDesc : location of descriptor file                                               //
+  // @param i_locDB : location of DB                                                                      //
+  // return : the SQLiteTreeHandler object on DB                                                  //
+       /////////////////////////////////////////////////////////////////////////
      SQLiteTreeHandler* Gimmick::createDB(const std::string &i_name,
+                                            const std::string &i_locDesc,
+                                            const std::string &i_locDB)
   {
-      SQLiteTreeHandler *sqlTreeH = new SQLiteTreeHandler(i_locDB);
+     SQLiteTreeHandler* sqlTreeH( new SQLiteTreeHandler(i_locDB) );
     // Create or open local database
     if (! boost::filesystem::exists(i_locDB) )
      {