Restore the memory

#1

Restore memory lost the soonest possible time, the better