
----- Original Message ----- From: "Jason Hise" <chaos@ezequal.com>
Regarding the static creation policy... would it be dangerous to use such a policy if there were static dependencies in use? I am worried that the static storage might be released before the said dependency and then when this last dependency dies it would try to destruct an object living in now inaccessible memory. Is this concern well founded?
There are alternate ways that you might implement the "static dependency" thing that mean there are alternate answers, but the concern (IMO) is well founded, e.g.; important_object top_secret; vs important_object *top_secret = new important_object; if at file scope, these are obviously treated differently by the C runtime (global ctor+dtor). good luck.