A flame consists of a cloud of hot ions, the overall charge is neutral but there are many ions of both + and - charge. This mixture of + and - ions means that if any charged surface is introduced into the plume of gases it will find what ever charges it needs to be neutralized.
A charged insulator can be completely discharged by passing it through the warm air above a Bunsen flame. The heat energy from the flame causes the surrounding air to become ionized, i.e. it contains 'free' negative ions (electrons) and positively charged air molecules (due to the separation of one or more electrons from some of the neutral air molecules). In a gas both positively and negatively charged ions are able to move, and the charged insulator will attract the oppositely charged ions to it while repelling the ions of like charge. The insulator will attract the oppositely charged ions until it becomes neutralised, i.e. it 'loses' all its charge.