Well, if your character dies then you have to create a new one and choose a heirloom. You can choose between one of your items, half your caps or one of your perks. When you create a new character you can write on its story how it found your old character's corpse and looted it, finding the caps, the item or a torn diary page explaining part of their life, which will allow your new character to learn a perk from your old character, this cannot be done with racial perks if your new character is from another race.
You have to have in count that if your actual character has for example a super powerful weapon and after your character dies you want your new one to inherit it, it will only inherit the barebones of the weapon itself. It will be stripped of all mods and even ammo.
In case your character has a safe house other thing that you can lend is the key to enter, albeit by the time your new character reaches the place it will already be looted from all items, only the house mods will remain.