Hi all,

being my first post i hope i comply with all mailing/forum rules.

By setting up a unit test where the osgViewer::Viewer is used i observed the 
heap increases a few bytes each time the viewer is instantiated and destroyed.
I tracked it down to s_sceneCache in osgViewer/Scene.cpp:
Since Referenced::signalObserversAndDelete() will first reset the pointer 
member in the observing observer_ptr before deleting this, the dtor of 
osgViewer::Scene won't find itself in the s_sceneCache and will leave an empty 
observer_ptr.

Does the SceneCache really need to be a vector of observer_ptr, or should it be 
a vector of plain pointer?

Although this is not a big issue (i don't want to create/destroy Scene objects 
frequently) it would prevent me from using the Viewer in a unit test with heap 
watch.

Cheers,
Matze

------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=27664#27664





_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to