It is known that near-Earth objects (NEOs) during their orbital evolution may often undergo close approaches to the Sun. Indeed it is estimated that up to ~70% of them end their orbital evolution colliding with the Sun. Starting from the present orbital properties, it is possible to compute the most likely past evolution for every NEO, and to trace its distance from the Sun. We find that a large fraction of the population may have experienced in the past frequent close approaches, and thus, as a consequence, a considerable Sun-driven heating, not trivially correlated to the present orbits. The detailed dynamical behaviour, the rotational and the thermal properties of NEOs determine the exact amount of the resulting heating due to the Sun. In the present paper we discuss the general features of the process, providing estimates of the surface temperature reached by NEOs during their evolution. Moreover, we investigate the effects of this process on meteor-size bodies, analyzing possible differences with the NEO population. We also discuss some possible effects of the heating which can be observed through remote sensing by ground-based surveys or space missions.