Implemented memory leak test