Hi Charles,

My attempted process to close is that I (1) set a flag on a render thread to stop 
calling viewer->frame (very similar to setDone(true)); (2) destroy the loaded 
drawables and free their associated libraries; (3) destroy the view, and thus it's 
associated camera and graphics context; and (4) destroy the composite viewer.  I 
use reference pointers in every case except for the composite viewer (although 
I've tried a reference pointer for it as well, but still get the same result).

Just wondering, if you're using ref_ptrs, why don't you just let the CompositeViewer's ref_ptr go out of scope (or delete the object that has the ref_ptr<CompositeViewer>) and be done with it? That should cascade down, destroying the views, then each view's scene graph. And if your custom drawables do the right thing in their destructors, that should be taken care of too. You shouldn't have to manage destruction order yourself.

Perhaps I'm missing something here, but that generally just works.

J-S
--
______________________________________________________
Jean-Sebastien Guay    [email protected]
                               http://www.cm-labs.com/
                        http://whitestar02.webhop.org/
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
  • [osg-use... Cole, Charles E. (LARC-B702)[RAYTHEON TECHNICAL SERVICES COMPANY]
    • Re:... Cole, Charles E. (LARC-B702)[RAYTHEON TECHNICAL SERVICES COMPANY]
    • Re:... Jean-Sébastien Guay
      • ... Cole, Charles E. (LARC-B702)[RAYTHEON TECHNICAL SERVICES COMPANY]
        • ... Jean-Sébastien Guay
          • ... Cole, Charles E. (LARC-B702)[RAYTHEON TECHNICAL SERVICES COMPANY]
            • ... Jean-Sébastien Guay
    • Re:... David Spilling
      • ... Cole, Charles E. (LARC-B702)[RAYTHEON TECHNICAL SERVICES COMPANY]

Reply via email to