Joan Rivers gave her daughter an "amazing gift" of knowing when to switch off her life support.

Melissa and Joan Rivers

Melissa and Joan Rivers

The 81-year-old star passed away last August after experiencing complications during surgery and Melissa Rivers knew she was making the "right" decision in agreeing to have her ventilator switched off because the 'Fashion Police' host had a living will which explained the quality of life she would accept.

Melissa explained: "She had written in specifically that she was to be able to go onstage. For an hour. And be funny.

"She wasn't going to be happy wheeled in to sit in the sun, you know? It was an amazing gift to give me, knowing exactly how she wanted her life to be. Not that it's ever an easy decision, but I knew I was making the right one."

When the ventilator was switched off, Melissa - who flew from Los Angeles to New York with her 14-year-old son Cooper to be with her mother in her final days - climbed into bed with Joan and held her as she took her last breath.

She recalled to People magazine: "I believe she knew I was there.

"I was grateful to have had those few days to be able to let go a little bit. I tried to make the transition as peaceful and beautiful as she would want it to be."

Despite her devastation over her mother's passing, the 47-year-old producer is doing "OK".

Asked what she would say if she could speak to Joan now, she replied: "I'd say, 'I love you. I miss you. You have no idea how much you meant to Cooper. And we're OK.' We're going to be OK."