What if I wish a local to "die" before the close} of the scope wherein it was created? Can I call a destructor on a local if I want to?
A: No
Imagine the (desirable) side effect of destructing a local File object is to close the File. Suppose now you have an object f of a class File and you wish File f to be closed before the end of the scope (that means }) of the scope of object f:
void someCode()
{
File f;
...insert code that must execute while f is still open... We wish the side-effect of f''s destructor here!
...insert code which should execute after f is closed...
}
There is a simple solution to this dilemma. However in the mean time, remember: Do not call the destructor explicitly!