Any iron based metal exposed to a magnet will temporarily exhibit weak magnetic properties. With continued use of a magnet with your handgun you may incur a very slight magnetism of the slide.  (When we say slight, we mean barely pick up a small paper clip slight) A simple tap or jolt of the weakly magnetized metal will shock the metal back to original state. There is no permanent effect on the iron-based metal.