Hi Robert,

still crashing. I am building debug now

-Nick


On Fri, Feb 19, 2010 at 5:48 PM, Michael Platings <[email protected]>wrote:

> Hi Robert,
> with the latest files (including the observer_ptr you posted at 15:18)
> everything is working fine for me now (Visual Studio 2008, Windows XP).
>
> However, is observer_ptr's destructor thread safe? It looks like if the
> target of _ptr were to be destroyed on another thread at the same time as
> observer_ptr's destructor is running then there's nothing to stop the
> observer_ptr calling removeObserver() on an invalid pointer.
> How about:
> ~observer_ptr()
> {
>     OpenThreads::ScopedLock<OpenThreads::Mutex> lock(*getObserverMutex());
>     if (_ptr) _ptr->removeObserver(this);
> }
>
> _______________________________________________
> osg-users mailing list
> [email protected]
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
>
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to