What Causes Barrel Pitting?

What Causes Barrel Pitting? The vapors originated from a leak of gasoline through a single hole formed by corrosion between a steel gasoline pipe and a zinc-plated water pipe. Firearms can also suffer from pitting, most notably in the bore of the barrel when corrosive ammunition is used and the barrel is not cleaned soon