When a solid is heated, vacancy defect is produced in the crystal. This is because of heating, some atoms or ions leave the lattice site completely, i.e. some lattice site becomes vacant. As a result of this defect, the density of the substance decreases because some atoms/ions leave the crystal completely.