In a synth with patch memory, if the memory consists of a volatile type of RAM, it is necessary to maintain power to the memory at all times to avoid losing the patch data. In these types of synths, a backup battery maintains power to the RAM when the synth is powered off. On many synths, there is no specific indication of when the backup battery needs changing; the first indication is when the synth "forgets" patches, or begins to behave oddly. Some synths accept external memory cards, which may also have batteries in them.
Usual practice in the industry has been to use long-lasting lithium batteries for this purpose, although a few 1980s synths used nickel-cadmium batteries. These had an unfortunate habit of leaking and damaging the circuit boards they were mounted to; the Korg Polysix is notorious for having this problem, but there are other synths made in the early 1980s (before lithium batteries were widely available) that suffer from this. New designs are tending toward using flash memory or some other form of non-volatile storage, so that a backup battery is not needed.