Added optional instance removing on memory warning