What happens if you make a gas of magnetic particles
If you heat up the magnet above Curie temperature (or more drastically just evaporates it), the magnetic spins will be randomly aligned and the magnetic field  is not produced anymore (at higher temperature).