Actor Alan Thicke arrives for the premiere of "National Lampoon Presents One, Two, Many" in Los Angeles on April 10, 2008. Reuters

"Growing Pains" fans around the world were shocked and saddened this week by the sudden death of Alan Thicke, who played Dr. Jason Seaver in the popular '80s sitcom. Thicke, age 69, died of a heart attack Tuesday while playing hockey with one of his sons.

Thicke leaves behind not only a legacy but also the earnings he received from appearing in shows like "Fuller House," and "The Bold and the Beautiful" and writing theme songs for shows like "Wheel of Fortune" and "Diff'rent Strokes." Celebrity Net Worth estimates his net worth totaled about $40 million.

So what happens next?

If Thicke died with a legal will, he may have already chosen an executor, or a person who will manage his estate to pay off debts and reassign his assets as he intended, according to the official website of the government of Ontario, Canada, where Thicke was born.

If Thicke died without a will, the court will appoint an executor and distribute his assets.

"[Late celebrities] have two types of assets," Mark Roesler, an attorney with CMG Worldwide, told Marketplace in 2014. "Tangible assets — cars, bank accounts, homes; and intangible assets — copyrights, trademarks [and] the right of publicity, which is the right to your name and likeness."

Thicke was married three times, to actress Gloria Loring, beauty queen Gina Tolleson and model Tanya Callau. He had three sons named Brennan, Robin and Carter. Given their close relationship, they will likely inherit some of Thicke's money.

His money may also go to support the Alan Thicke Centre for Juvenile Diabetes Research, which debuted in 1989 after Thicke learned one of his sons had the condition, March of Dimes or the Juvenile Diabetes Research Foundation — all of which he actively supported during his career, according to InsulinNation.

"If you’re not doing something, you’re driving yourself crazy," Thicke said in 2014 while discussing his charity work. "To me, it’s almost a selfish kind of therapy."