Darrell,
They are related and also completely unrelated. How's that for an answer.
Seriously, assuming you are primarily speaking of SPS corals the above is true. SPS regulate the quantity of zoox (the dinoflagellate algae they live in symbiosis with) they have based on Oxygen levels produced by the zoox. If they are producing too much, they will pull in their polyps and provide less surface area for the zoox to obtain light. If after doing this, they are still getting too much Oxygen from the zoox, they'll kick a small portion of them out. This goes on day in and day out and it is completely invisible to us as the coral merely gets more colorful and less brown. (This is a vast oversimplification but consider the zoox brown).
Temperature plays a role in the ability of the zoox to provide the proper amount of Oxygen to the coral. With rising temperatures, as opposed to providing Oxygen and Carbon (sugars) to the coral and utilizing the Nitrogenous waste produced by the coral, the opposite happens. I.e. the zoox produces CO2 as well as it's own waste, neither of which the coral wants. Then the coral says, "Honey, your lazy good for nothing brother has lived here long enough....he's gone" and boots the zoox out. This is triggered by a stress enzyme.
In reality, this is a desperate attempt at survival as the coral hopes to be re-infected by a different clade of zoox that is more heat resistant. They also engage in other activities that seem like suicide to us such as polyp bailout. When macroalgaes go asexual, it looks like suicide to us as well but in reality, this is also their attempt to survive.
FOOTNOTE: This is a very involved subject and my answer doesn't even remotely begin to explain everything that is going on. For more information on this subject, read some of these articles by Dana Riddle.
Dana Riddle Articles