remove the memory leakage