As childish as some people like to think the Harry Potter books are, it's hard to agree with that assessment when there is a theme of death and impending war throughout the novels. None of the novels more so than "Harry Potter and the Deathly Hallows." More characters die in this novel and there is more mention of death than in any other Harry Potter book. (There be spoilers ahead.)
Death looms over the setting and characters from the very first chapter of "Harry Potter and the Deathly Hallows." In the previous book, Harry's friend and teacher, Albus Dumbledore, was murdered. Harry thinks back on this while he reads Albus' obituary at the very beginning of the Deathly Hallows. Not long after, Harry leaves his longtime home on Privet Drive with his friends. All the while, he has to be concerned about Voldemort finding him and trying to kill him, which he does within minutes. Of course, Harry is not killed. . . yet. Even before this, Lord Voldemort kills the muggle studies teacher from Hogwarts at the Malfoy house.
While Voldemort and his followers are chasing Harry, one casts a killing curse at Harry. It misses and hits Harry's bird, Hedwig. Mad-eye Moody is also killed in this chase. After failing to kill Harry, the Death Eaters and their master turn back to their other plans. That is, to take over the Ministry of Magic. In the process, the minister, Rufus Scrimgeour is murdered by a colleague who is under an Imperius curse.
Not long after this, a string of killings begins while Voldemort is searching for the Elder Wand. Furthermore, stories about past deaths are told. Hardly a chapter passes where there is not some mention of death or the possibility of it. Main characters begin dying again when Bellatrix Lestrange kills Dobby, the house elf. Dobby was a true friend of Harry's and Harry is devastated by the loss. The novel seems to take a turn here. Hope for Harry and his friends starts fading, but Harry is determined to see his plan of killing Voldemort through to the end.
Harry's hunt for the Horcruxes takes him back to Hogwarts where the battle of good and evil is about to begin. During that battle, Harry himself is killed and he sees all of his dead loved ones. Numerous good and bad people are killed. The most notable of the bunch are Snape, Fred Weasley, Crabbe, Lupin and Tonks. In the very end, Molly Weasley kills Bellatrix Lestrange and Harry kills Voldemort, for the final time.
As you can see, the threat of death lingers around all of the main characters in "Harry Potter and the Deathly Hallows." A war has begun and anyone could end up a victim of a dark witch or wizard at any time. One might say that death is the theme of this novel, were it not for the fact that love and friendship prevail.