The other night my wife placed a bottle of soft drink in the freezer and forgot about it.

Lucky it was in a PET bottle so it did not burst and shatter.
My problem is that I can not recall why all the gas comes out when soft drink freezes. I keep thinking only that the solubility of gas in a liquid increases with a decrease in temperature, unlike solids such as salts.
I once placed a freshly opened can of Coke in a large necked thermos filled with liquid nitrogen and that too produced a spectacular fountain of Coke....messy, but spectacular.
Can anyone refresh my memory on why dissolved gas is driven off when the liquid in which it is dissolved gets colder?
cheers,
Doug