at the end of operation on each node, clean the memory of intermediate variables.
This change does not influence the performance.