check for memory leak