add memory leak and trace way