As Bellatrix stands holding Hermione, the chandelier over her head crashes onto her - Dobby's work - and in the commotion that follows, Harry, Ron, Hermione, and Griphook manage to grab [Gryffindor's sword] and [Apparate] to [Shell Cottage], and to safety.
In the garden of [Shell Cottage], Harry kneels over Dobby's body as Bill, Fleur, [Dean], and Luna gather around him. Finally, he decides to bury the house-elf himself, and Bill provides him with a spade to do it.
As the night wears on, Harry digs Dobby's grave, thinking to himself about [Horcruxes] and [Hallows], Voldemort and Wormtail, [Grindelwald] and [Dumbledore]. And as he digs, he discovers he can now shut Voldemort out of his mind, and that he knows what it is he now has to do.
Ron and [Dean] come out to Harry as dawn breaks, and they are soon joined by the others in burying Dobby, with Luna saying good-bye for them all. As the others depart, Harry remains behind and finds a gravestone, which he marks: "HERE LIES DOBBY, A FREE ELF."
Harry finds Griphook in bed, healing, surprised and impressed at how Harry buried Dobby. He then asks him for help in breaking into the [Lestranges] vault at [Gringotts], and - despite some rudeness from Ron - Griphook agrees to consider the request.