Added memory leak tests