X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=src2%2FcreaImageIOTreeNode.h;h=5b221de611009e0ef07009df3e944730d1fde3d1;hb=a67d921cdc10d438852b48c2985f14d91320e016;hp=55d6ab570b36a46c7adad26c00419fb0e5ccf284;hpb=320881ed38a25ff56c33aa915d4b943c1e42698b;p=creaImageIO.git diff --git a/src2/creaImageIOTreeNode.h b/src2/creaImageIOTreeNode.h index 55d6ab5..5b221de 100644 --- a/src2/creaImageIOTreeNode.h +++ b/src2/creaImageIOTreeNode.h @@ -3,9 +3,11 @@ #include #include +#include #include #include + namespace creaImageIO { @@ -115,7 +117,7 @@ namespace creaImageIO { if (mData!=0) return dynamic_cast(mData); return 0; } /// Sets the node data. Deletes existing data if any. - void SetData(NodeData* d) { if (mData) delete mData; mData = d; } + void SetData(boost::shared_ptr d) { mData = d; }//{ if (mData) delete mData; mData = d; } /// Sorts the children of the node void SortChildren(const LexicographicalComparator&); @@ -135,7 +137,7 @@ namespace creaImageIO /// The map of attributes AttributeMapType mAttributeMap; /// User data - NodeData* mData; + boost::shared_ptr mData; /// Are the children loaded ? bool mChildrenLoaded; /// The number of children