The destructor, remove callback, simply releases the card instance. Then the ALSA middle layer will release all the attached components automatically.
It would be typically like the following:
The above code assumes that the card pointer is set to the PCI driver data.