rm memory leak