Cooking or baking moldy food will destroy the visible mold, but the food may still be toxic due to the mold toxins that are heat resistant and will remain in the food. Toxins like aflatoxin and mycotoxins are likely to still proliferate in the food, even after mold has withered from the heat.