Step 1: Analyze the effect of heating on resistivity.
For metallic conductors, resistivity increases with temperature.
Hence,
Resistivity changes.
Therefore,
(B) is not correct.
Step 2: Analyze the effect on resistance.
Resistance is given by
\[
R=\rho \frac{L}{A}
\]
Since resistivity
\[
\rho
\]
changes with temperature, resistance also changes.
Hence,
(C) is not correct.
Step 3: Analyze the effect on drift speed.
Drift speed is
\[
v_d=\frac{I}{neA}
\]
When the resistor is heated, resistance increases, causing current to decrease for a constant battery voltage. Thus drift speed also changes.
Hence,
(A) is not correct.
Step 4: Analyze the number of free electrons.
Heating a metallic conductor does not significantly change the number density of free electrons.
Therefore,
Number of free electrons remains unchanged.
Hence,
(D) is correct.
Step 5: Final conclusion.
Therefore, the quantity that does not change is
\[
\boxed{\text{D}}
\]