1. A device comprising: a plurality of memory cells; and a circuit for applying an erase pulse to erase the plurality of memory cells, and for pre-programming the plurality of memory cells only if a leakage occurs after the plurality of memory cells are erased.