How does temperature affect the solubility of a gas?

Flexi Says:
Several substances – HCl, NH3, and SO2 – have solubility that decreases as temperature increases. They are all gases at standard pressure. When a solvent with a gas dissolved in it is heated, the kinetic energy of both the solvent and solute increases. As the kinetic energy of the gaseous solute increases, its molecules have a greater tendency to escape the attraction of the solvent molecules and return to the gas phase. Therefore, the solubility of a gas decreases as the temperature increases.