deal with leak memory