Robin Williams' daughter has abandoned her online social media accounts in disgust following what she called "cruel and unnecessary" messages after her father's death, a move that has prompted Twitter to explore how it handles such situations.

Zelda Williams, 25, wrote that she was stepping away from her Twitter, Tumblr and Instagram accounts "for a good long time, maybe forever".

The move came after at least two users upset the grieving actress by sending disturbing images and verbal attacks. In one of her last tweets on Tuesday night (August 12), Zelda asked fellow users to report her alleged tormentors to Twitter managers. "I'm shaking," she wrote.

Well-wishers and fans online quickly rallied to Zelda's defence, and the accounts of both alleged bullies were suspended by the following day. Facebook, which also owns Instagram, said the photo violated its policy and was "being actively flagged and removed across both platforms as it pops up."

Twitter went further. "We will not tolerate abuse of this nature on Twitter," Del Harvey, who heads Twitter's Trust and Safety Team, said in a statement.

"We have suspended a number of accounts related to this issue for violating our rules and we are in the process of evaluating how we can further improve our policies to better handle tragic situations like this one. This includes expanding our policies regarding self-harm and private information, and improving support for family members of deceased users."

Last summer, Twitter introduced a one-click button to report abuse and updated its rules to clarify that it will not tolerate abusive behaviour.

Zelda also alluded on Instagram to users being hateful following her father's suicide: "In this difficult time, please try to be respectful of the accounts of myself, my family and my friends. Mining our accounts for photos of dad, or judging me on the number of them is cruel and unnecessary."

Meanwhile, sheriff's officials in the San Francisco Bay area are defending their decision to release details about how the comedy actor killed himself, saying state law requires they be disclosed to the public.

Marin County Sheriff's Lt Keith Boyd said in an email that the agency would have liked to withhold some of the information, but could not under the California Public Records Act.

During a live, televised news conference Boyd described in detail how Robin carried out the suicide and the condition of the body. Some said the level of detail was too much.

Boyd said the sheriff's office will likely also have to release the 911 call it received from Robin's home reporting his death.