Hi
I have following class
public class Node : NSObject
{
public Int64 Fid { get; set; }
public Int64 Pid { get; set; }
public string Name { get; set; }
public State State { get; set; } = State.Off;
public Node Parent { get; set; }
public string Path { get; set; }
public IList<Node> leaf = new List<Node>();
public IList<Node> NodeList
{
get { return this.leaf; }
set { this.leaf = value; }
}
public bool HasChildren
{
get { return (this.leaf.Count > 0); }
}
public Node(Node parent)
{
Parent = parent;
}
public Node(Node parent, string path, string fldname, Int64 fldid, Int64 fldpid)
{
Parent = parent;
Path = path;
Name = fldname;
Fid = fldid;
Pid = fldpid;
}
public void SetStateToChildren(State state)
{
}
public void SetStateToParent(State state)
{
}
}
I am allocating memory to root node using
nodeTree = new Node(null, tmp, strPath, 501, 0);//Node(Node parent, string path, string fldname, Int64 fldid, Int64 fldpid)
and all other child node
nodeTree.NodeList.Add(new Node(nodeTree, tmp, strFolderName, FldId, ParentId));//Node(Node parent, string path,string fldname,Int64 fldid, Int64 fldpid)
I want to delete each data members and each node to clean the memory. How will clean the memory.