The contents of volatile memory, also known as flash memory, is not preserved when the device is turned off, unlike non-volatility memory, also known as persistent memory, which can be used for long term data storage as it does not get erased when there is no power to the device. Because its content is constantly refreshed volatile memory is faster, so RAM memory used in modern computers is always volatile memory because it needs to be fast. In contrast, non volatile memory is used for hard drives because it doesn't need to be as fast and it is much cheaper because it requires far less power, and is also cheaper to produce.