Fix the memory leak in the Node Pool class.