Actually the metal comb gets charged electrostatically. But as soon as you touch it with hands, the charges pass to the ground through body immediately. Obviously this does not happen in case of a metal comb with plastic handle as plastic is insulator. So the charge retains.