Updated Jan, 2013
First, a little introduction. Note: I've written this in layman's language so you don't have to be an engineer to understand. That's why I don't use too many technical terms.
Alkaline batteries have their place in just about all electronic equipment. They have a much longer shelf life than carbon-zinc, NiCad (Nickel Cadmium), or NiMh (Nickel Metal Hydride) cells. This means they can be stored for over five years before any noticeable self discharge. However, some equipment such as lights, radios, recorders, or mp3 players will discharge the batteries at a very slow rate even if turned off. This is because there is a small amount of current being used to control the power button. In other words, it's always on. An easy way to tell if a particular device is using power when turned off is if the power button is a mechanical slide or toggle switch or if the button is a push-push type to turn it on or off.
If the device is stored unused for long periods of time (3 to 6 months or so) with the batteries installed, whether carbon-zinc, alkaline, or rechargeable type, the batteries may leak or give off corrosive gases that will corrode the contacts or electronics in close proximity to the cells.
What will aggravate and speed up the corrosion is if the device is sealed air tight. This is the case in sport lights like underwater spotlights and metal detectors, bicycle led lights and Maglites(r). If bicycle lights are stored with the alkaline cells installed over the winter when not used, there is a good chance the gas or alkalyd leakage will corrode the cell contacts and anything around it. This may not seem evident even if the light functions. A very thin oxidized coating will form on the battery and contacts and cause the battery to not make good electrical contact. What can sometimes happen is some vibration such as going over a bump on your bike will cause an intermittent power loss to the circuit and cause it to turn off. Most people suspect the device as being bad even if an fresh set of batteries are installed and the problem continues.
Batteries should be removed if the device is not to be used for over two months. It is also advisable to occasionally open a sealed device and let fresh air into the sealed space. Another preventive measure is to apply a very thin coat of Vaseline jelly on the battery and contacts. What's even better is to use a chemical called Deoxit that is available in some electrical shops, Radio Shack, or high end audio retailers. Google "deoxit" or look on eBay, Amazon, or Radio Shack.
It comes in a spray can or brush applicator. Apply a very thin coating on the battery and the device contacts. A container will last a very long time. This will seal the metal contacts from the corrosive gasses and oxygen that will cause intermittent performance.
I do a lot of mountain biking and it seems I always forget to remove the batteries from my ViewPoint LED lights and each spring I have to disassemble my lights, clean the corrosion off the circuit board and battery contacts. Fortunately the corrosion hasn't eaten away enough of the metal contacts or circuits to make it totally defective.
When I used to SCUBA dive, I bought an expensive underwater spotlight. The SCUBA shop always said to use general purpose carbon-zinc batteries and replace them after each use. No one there could tell me why I couldn't use alkalines, so I did. After a year of non-use, I looked at the shiny reflector behind the bulb and it was gone. Apparently the gas from the alkalines ate away the silver reflector surface and the spotlight was a total loss!
Carbon-zinc batteries will leak profusely if they discharge and are left in a device. NiCads will corrode if left in equipment and allowed to discharge. As a general rule, always remove batteries from devices and electronic equipment when not in use.