delete the memory of node.