Here is a script by someone who sadly I can not remember who!
So whomever he is, he gets the credit!
; Select the Unit
_unit = _this select 0
;-Delay the delete after death
~30
; delete the unit
deletevehicle _unit
exit
and in the init field of the unit you want deleted after it gets killed place :
this addeventhandler ["killed", {_this exec "erase.sqs"}];