‘Main characters’ refers not only to the protagonist and antagonist, but to other important characters.
In fiction, the method of death and the manner in which it is received can define a character. The heroic sacrifice, the cowardly slaughter, the sudden vanquishing of all hope can make an impact like no other event. History furnishes us with some great examples: the defiance at Thermopylae, the sudden end of Alexander, the tragic heroism of Constantine XI. Death can be used to reveal a person’s true self, stripping away the image they like to portray and betraying their weakness, or highlighting their strength.
The end of Spock in Wrath of Khan and Darth Vader in Return of the Jedi stand out as examples of deaths in fiction (albeit temporary in one case) that are well done.
Of course, there is a downside. Death tends to be a one-way street. With fantasy and sci-fi, you do get to break the traffic laws if you want to, but doing so excessively cheapens and dilutes the nature of death.
I must admit, I love a good death, whether it’s the wicked murdering the helpless or the vengeful hand of justice slaying an evildoer. Two of my favourite modern authors (George RR Martin and Joe Abercrombie) enjoy quite a lot of cast-culling. Indeed, I suspect Martin’s A Song of Ice and Fire series (as yet unfinished) probably has killed off more characters than some series ever include.
It can be overdone, though. A certain number of core characters, whether villains or heroes, are needed to provide continuity. A good example of this is Livia in the brilliant TV series, I, Claudius. Played by Siân Phillips, she lasts longer than almost any character (second only to Claudius himself and her son Tiberius, I think) in a series rife with murder and covering a period of many decades.
So, what are my intentions with deaths, when I write? I try to have a reasonable number of secondary characters, as this helps me to paint a better picture of the city. There are a number of mages, the ruling aristocrat, the corrupt captain and a charming criminal given the splendid name of Thaddeus. This also means there’s plenty of room for having characters end up dead (which is in line with the central plot). I’m not going to be quite so friendly with the Grim Reaper as the excellent Mr. Martin, but the character list will be noticeably shorter when I’ve finished than when I began.