Erase memory leaks