Retain Variable in Ram through Reset

Yes it never gets cleared from memory by the reset. However the trick is to stop your variable being initialised by your code as it starts again. How is your code going to distinguish between a reset and a power up?