Heat always flows from substances of a warmer temperature to substances of a cooler temperature. Heat (thermal energy) will be exchanged in an environment until a common temperature (equilibrium) is achieved.
While an emphasis on the quality of roofing is important, an equally important facet is often overlooked—the application of insulation below the roof deck