Hi Michael,

On Thu, Nov 25, 2010 at 1:41 PM, Michael Platings <[email protected]> wrote:
> Thanks Robert.
> I left the declaration of the static variables outside the function because
> local static variables aren't thread safe:
> http://blogs.msdn.com/b/oldnewthing/archive/2004/03/08/85901.aspx
> Could putting the static variables in an anonymous namespace avoid the
> issues with static builds?

The problem with static builds and static variables was a runtime
problem rather than compile time.  To resolve the problem I had to
move variables from the global scope into the scope of singleton
method.  I can't see how using a namespace would avoid the runtime
initialization problem.

Robert.
_______________________________________________
osg-submissions mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org

Reply via email to