Hi Mark,
There's a race condition in the unref() code. The pointer passed in to s_allocationObserver on line 213 may reference a deleted object. Specifically, a second thread can interrupt this thread immediately after it decrements the reference count, and unref the object to delete it before the first thread regains control. To be safe, this call should be moved to the top of the function, before decrementing the refCount.
Hm, I didn't have any problem, but thanks for pointing this out. It's certainly better to be safer.
I fixed it for unref_nodelete() (in Referenced.cpp) as well. Thanks. J-S -- ______________________________________________________ Jean-Sebastien Guay [email protected] http://www.cm-labs.com/ http://whitestar02.webhop.org/ _______________________________________________ osg-submissions mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org
