In my physics book (and wikipedia) it states that the thermal energy transferred to an object is: $Q = c \ m \ dT$, where $Q$ is the transferred thermal energy, $c$ is the specific heat capcity of the material, $m$ is the object's mass and $dT$ is the change in temperature.
So far so good, but what I don't understand is that, as an objects temperature is changing, then surely its mass would change as well, right?
So how should one use the formula in that case? Is it as simple as the average mass between the two temperatures? Or should one just use the mass from the first state?