If a plantation owner or similar died and had no living heir what happened? Did they become free? Did they pass to someone else? Sold with the money going to the state? I mean it must have happened some time.
It depends on the time and place. If we're talking about the American South, it tends to have some differences from the 18th to 19th centuries. Manumission was not very common, and even less so after the Stono Rebellion in South Carolina. I'll have to give a generalized account, as there are a lot of nuances depending on time period and region, but there are a few familiar patterns throughout.
Often the slaveholders had the enslaved in their wills either to be given to friends/family, distributed, or sold off to pay debts. I work at a small plantation site, the owner passed giving away some of the enslaved to his wife and children, with the rest to be sold off. The land was rented out for a couple of years, with the enslaved included in the deals, before being completely sold off. In a case that there were no heirs, the estate would be sold at public auction -including both property and enslaved. It happened often enough to be seen in contemporary newspaper adverts.
The status of the enslaved was a legal status, not determined by the lifespan of an owner. They could only be freed by an act of manumission, in many cases like in SC in the 19th century by an act of legislation.