]> Creatis software - creaImageIO.git/blobdiff - src2/creaImageIOWxGimmickView.h
set vectors of pointers (with many memory leak) as vectors of shared_ptr
[creaImageIO.git] / src2 / creaImageIOWxGimmickView.h
index b710bca54d2fe762b82e1fd69901276e1b70ad38..1325306da3eddd7468ff85e729d78ad1335496a0 100644 (file)
@@ -34,7 +34,7 @@ namespace creaImageIO
     typedef int EventType;
     
     /// Ctor
-    WxGimmickView(Gimmick*
+    WxGimmickView(boost::shared_ptr<Gimmick> 
                  wxWindow *parent, 
                  const wxWindowID id,
                  const wxPoint& pos, const wxSize& size,
@@ -69,9 +69,9 @@ namespace creaImageIO
     ///Resets the default image
     void ClearSelection();
        ///Copies selected files
-       void CopyFiles(const std::vector<std::string>& filenames);
+    void CopyFiles(const std::vector<std::string>& filenames);
        ///Add selected files to the Database
-       void AddDir(std::string dirName);
+    void AddDir(std::string dirName);
     
     
     ///Sends a request to read the currently selected node and the ones that surround it.
@@ -138,7 +138,7 @@ namespace creaImageIO
     wxImageList *    mIcon;
     void CreateIconList();
     
-    Gimmick * mGimmick;
+    boost::shared_ptr<Gimmick> mGimmick;
        
        Listener* mListener;
     /// Callback for adding files
@@ -201,7 +201,7 @@ namespace creaImageIO
     ///Currently Displayed Node
     tree::Node* mCurImageItemToShow;
     //Pointer holders for images to be shown
-    std::vector<ImagePointerHolder*> pointers;
+       std::vector< boost::shared_ptr<ImagePointerHolder> > pointers;
     
     
     wxString mCurrentDirectory;