Fix the memory leak in the generated C++ code.