I had 2 people pass away when I was pregnant with Madeleine. One was my cousin, and one was my Ex's very close friend.
My cousin Ben knew we had been trying for a baby... and I actually found out just after he passed that I was pregnant... We decided that if the baby was a boy we would name him Ryan Benjamin.
Obviously we didn't get to use the name Benjamin, but all my children have or will have middle names in honour of their extended family members, some are alive, some are not.