Dilatation measurements, combined with thermal programmed desorption mass spectrometry (TPD-MS), were utilized for studying thermally induced porosity (TIP) in selective laser melting additively manufactured (AM) AlSi10Mg and Ta30at.%–Ti samples produced by hot isostatic pressing (HIP). A clear abrupt upward deviation in thermal expansion is observed, most probably indicating the occurrence of TIP mechanisms in both AM objects and powder metallurgy samples. For both AlSi10Mg and Ta30at.%–Ti, pores are clearly observed by either microscopic or macroscopic examinations. The TPD-MS analysis shows that both water and hydrogen evolve from AlSi10Mg powder particles, thus suggesting that thermally induced expansion of trapped hydrogen in HIP’ed Ta30at.%–Ti alloy and in laser powder bed fusion AlSi10Mg is the main source for the pressure increase in pores that consequently leads to permanent expansion upon heating. A simplified model that correlates the pressure inside the pores with the weakening of the material upon heating and TIP is proposed.