added listener for memory warning