In her forthcoming memoir, "Is It Too Late to Make a Run For It?", Judi Dench shares how Robin Williams offered quiet support while her husband Michael battled lung cancer.

Nearly three decades ago, Dench and her late husband were staying at Billy Connolly's Scottish home when they encountered Williams. Dench writes that "one evening there was a big party in the woods with a ceilidh and a bonfire." Michael was very ill and flagging, so the couple said good nights and began walking up a steep hill.

"Robin Williams appeared beside us and offered to help, but Michael said he could manage," Dench recounts. "And Robin said, 'Well, I think I'll ride shotgun anyway', which was such a lovely thing to say. I've often thought about that moment, Robin's sensitivity and understanding, just offering to be there, gently supportive, without imposing himself."

Dench had worked with the actor in 1996's "Hamlet" and received his Oscar in 1999 for "Shakespeare in Love." The comedian, known for "Jumanji," "Good Will Hunting," "Dead Poets Society," and "Mrs. Doubtfire," died in 2014 at 63.

Dench's husband died on Jan. 11, 2001, at 65. The couple wed in 1971.

Her memoir, due on Tuesday, also covers her experience acting in the 2019 film "Cats," which was widely panned. The film, adapted from Andrew Lloyd Webber's musical, featured a star-studded cast that included James Corden, Idris Elba, and Taylor Swift.

Dench wrote, "Oh God, I can't bear it - and [Lloyd Webber] had waited so long for it to be made. What a waste of all that goodwill and talent. I understand the critics were rather hostile to the film. I never saw the final cut so I can't judge. All I'll say is nobody sets out to give a poor performance or make a bad film. You do your best, offer something up and hope that people will get on board and join the party."