# Why do we have to compute maximum safe current through resistor equalizing heat exerted by the resistor and heat created in resistor?

My book says says resistance of a wire = $\rho l/\pi r^2$ where $\rho$= resistivity of the resistor material. l=length of the resistor. R= radius of the resistor so heat produced H = $I^2 \rho l$/ $J \pi r^2$ J= joule constant. Then heat to exerted by the resistor per second us $2\pi rlh$ if h= heat exerted by the unit area of the resistor per unit second. So by equalizing both we get maximum current as $I_{max}^2$ = 2 $\pi^2 J h r^3/ \rho$. So my question is why do we equalize those heats?