From comp.lang.c++.moderated:
This is just a simple example to illustrate the mechanics of the problem. The actual system is far more complex. For the sake of argument suppose that f passes the Handle to a different thread context that destroys the Handle during one of three distinct timeframes depending on the runtime environment. Either (1) before the constructor returns; (2) after the constructor returns and before the assigned handle is destroyed; or (3) after the assigned handle is destroyed. The problem occurs in case 1. -Andrew.
That doesn’t make it any less flawed; it just demonstrates that it’s flawed in a complex manner.
Kevin P. Barry
Systematic application of the Socratic method seems to me a potentially fruitful approach. When a child asks you a “why” or “how” question, reply with a leading counter-question—let the child try to form a hypothesis, then ask him or her to try to come up with ways to test the hypothesis, giving hints and tips along the way.