We report a systematic study of thermal effects in photonic crystal membrane lasers based on line-defect cavities. Two material platforms, InGaAsP and InP, are investigated experimentally and numerically. Lasers with quantum dot layers embedded in an InP membrane exhibit lasing at room temperature under CW optical pumping, whereas InGaAsP membranes only lase under pulsed conditions. By varying the duty cycle of the pump beam, we quantify the heating induced by optical pumping in the two material platforms and compare their thermal properties. Full 3D finite element simulations show the spatial temperature profile and are in good agreement with the experimental results concerning the thermal tolerance of the two platforms.