Mr. Rodger rejected attempts by his parents and therapists to treat him. “I don’t know why my parents wasted money on therapy, as it will never help me in my struggle against such a cruel and unjust world,” he wrote in his manifesto. A doctor prescribed him risperidone, an antipsychotic drug, but Mr. Rodger wrote that after researching the drug, he had refused to take it.

Under California law, if Mr. Rodger in speaking to a therapist had expressed the violent thoughts found in his manifesto or last video, the therapist would have been required to report it to the authorities. The man Mr. Rodger identified as his therapist in his manifesto did not return telephone calls or emails seeking comment on Monday.

A friend of the family, Simon Astaire, said he did not know if any such report was made. Mr. Astaire said he had spent time with Mr. Rodger, whom he described as withdrawn but showing no sign of violence. His father, Peter Rodger, was a Hollywood director, and worked as an assistant director on the movie “The Hunger Games.”

“Elliot never spoke about guns,” Mr. Astaire said. “Never. Never. Wasn’t part of his character. There was no fascination with it. He didn’t like violent movies as such. That was not part of his character.”

Laws that set down a mental health professional’s duty to warn the authorities of a specific threat from a client are often narrowly interpreted by practitioners, Mr. Cameron said. In truth, such laws offer latitude for therapists to inform not only the person who is a target but the police and other public agencies.

His final video, “Elliot Rodger’s Retribution,” which left no doubt as to his murderous plans, was not posted until the day attack began, according to Google officials. It was unclear who, if anyone, might have seen it before he mailed out his manifesto to his parents, friends and therapists on Friday night just before the attack began.

A spokeswoman for Google, which owns YouTube, said the video had been removed on Saturday because it violated the service’s guidelines against acts like stalking, intimidating behavior and the making of threats. The spokeswoman said most videos marked for removal are first flagged by viewers and then examined by special review teams that determine whether they meet the site’s guidelines. Google did not have immediate details on how many people might have seen it before it was taken down.