In that case I was thinking of a different potential problem :) What was the problem exactly? I want OSG to be as thread safe as possible so I'm keen to find a solution that solves both issues.
On 25 November 2010 15:42, Robert Osfield <[email protected]> wrote: > 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 >
_______________________________________________ osg-submissions mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org
