Memory cards, as well as other computer media such as disk and floppy drives, are sensitive to magnetic fields in varying degrees.
However, airport x-ray machines do not generate magnetic fields, they generate x-rays. While they do ues magnetic fields to control/focus the x-ray beam, these fields are usually fairly contained within the mechanics of the device itself.
While it is possible for x-rays to impact electronic media, the intensities involved with carry-on luggage are so low that the probability of any actual damage happening is close to non-existant. If the intensities were high enough to impact things electronic, your carry-on would probably burst into flames first.
I would be much more concerned with putting my digital camera in my checked baggage, since 1) the x-ray intensity is quite a bit higher, and 2) well, a camera in checked baggage might be a tempting target for pilferage.
The airport metal detector though does generate magnetic fields, so you're likely to be at much higher risk for data loss by carrying your memory card in your pocket (not to mention it might cause you to get selected for a more intensive search if you set off the detector).