add memory leak test sample code