If a variable is declared as static in a function\'s scope it is only initialized once and retains its value between function calls. What exactly is its lifetim
static
FWIW, Codegear C++Builder doesn't destruct in the expected order according to the standard.
C:\> sample.exe 1 2 Created in foo Created in if Destroyed in foo Destroyed in if
... which is another reason not to rely on the destruction order!