Commit 79c817a2 authored by Julien Malik's avatar Julien Malik

ENH: use WeakPointer instead of raw pointer to underline the smart pointer loop pb

parent 7db51c73
......@@ -167,13 +167,13 @@ public:
virtual const Parameter::Pointer GetRoot()
return m_Root;
return m_Root.GetPointer();
/** Is the paramter a root or a child of another param */
virtual bool IsRoot()
return (this == m_Root);
return (this == m_Root.GetPointer());
/** Add a child of this parameter when the param is a Group or a
......@@ -256,7 +256,7 @@ protected:
Role m_Role;
/** List of parents Parameters */
Parameter* m_Root;
itk::WeakPointer<Parameter> m_Root;
/** List of children parameters */
std::vector<Parameter::Pointer > m_ChildrenList;
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment