I believe so!

I've had the battery disconnected for a bit, reconnected, confirmed that the code was not there, drove around, checked to find the code back.