Every time you expose yourself to noise above 85 to 90 DBA you damage your hearing. All pistols and rifles generate sound pressures above the safe range.
There is only one way to preserve your hearing and that is to wear quality hearing protection each and every time you shoot.
Having said that, it is obvious that in a self defense situation one does not have time to stop and insert a a pair of EAR plugs. Instead you defend your life and accept the hearing loss.