-c++ memory leak proven fixed