ok .. make sense :) -Nick
On Mon, Feb 22, 2010 at 10:47 AM, Robert Osfield <[email protected]>wrote: > HI Nick, > > On Mon, Feb 22, 2010 at 8:43 AM, Trajce (Nick) Nikolov > <[email protected]> wrote: > > I think it will work. Building anyway. You might want to do the same for > > observer_ptr(T* t): _ptr(t) { if (_ptr) > > _ptr->addObserver(this); } > > This shouldn't be necessary as one assumes that the raw C pointer > being passed in to a observer_ptr<> is valid, something you can't > assume for an the observer_ptr<> copy constructor as the the other > observer_ptr can be invalidated by another thread while you are > accessing it. > > The addObserver() method itself is actually protected by the global > Observer Mutex itself so will be thread safe already. > > Cheers, > 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
