V
Victor Bazarov
Because that is not thread-safe ? Not sure I understand why "global" was
used sloppily, neither not sure of the purpose of this get_the_data()
function. Isn't this get_the_data() function a global function, so
instead foo could just as well be a global variable - the result is the
same: Ugly?
Foo is static, so it exists until the program terminates... Static is
not thread-safe, right? I think I can see that this doesn't really help
much, I'm just only 95% sure of the explanation...
Well, at least it does give you the ability to track (by adding some
kind of logging code) when access to the data is made. Beyond that,
there is no difference, I believe.
V