memory leak solved