|
Boost : |
From: Scott Woods (scottw_at_[hidden])
Date: 2005-01-20 18:42:55
----- Original Message -----
From: "Jason Hise" <chaos_at_[hidden]>
> 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.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk