Suppose in space you have a hydrogen gas cloud that is collapsing into a sphere under its own gravity. Pressure and heat rises due a decreased volume and gravity trap. Let's say the gas cloud is not going to reach fission and won't become a sun, so it's a gas giant. My question is under such pressure, heat is radiated back into space. According to conservation of energy something has to be lost from the gas giant. What is it?