If you had an iron planet the size of Neptune for example, I presume the gravity would cause a lot of pressure in the core which would heat up the Iron and radiate into space.
a) Is this an inexhaustible source of energy?
b) where is the engery comming from, is the planet loosing mass?