Hi,
I analysed osgVisual (and in comparison, osgviewer) with the debug build of 
openscenegraph.

I fixed my  memoryleaks, but these memory leaks are still existing in osgVisual 
but not with osgviewer (both cow.osg).

At the moment I don't know how to proceed, so if someone has an idea, I'm open 
minded :)

Otherwise I'll stop hunting these memory leaks, less than 1 kB is not so much.. 
;)


Code:

==4281== HEAP SUMMARY:                                                          
                                                                                
                                                                                
                                                                            
==4281==     in use at exit: 32,183 bytes in 413 blocks                         
                                                                                
                                                                                
                                                                            
==4281==   total heap usage: 3,086,029 allocs, 3,085,616 frees, 1,582,088,128 
bytes allocated                                                                 
                                                                                
                                                                              
==4281==                                                                        
                                                                                
                                                                                
                                                                                
                                                                                
                                                                                
                                                                                
                                                                                
                                                                                
                                                                                
                                                                                
                        
==4281== 128 (24 direct, 104 indirect) bytes in 1 blocks are definitely lost in 
loss record 51 of 77                                                            
                                                                                
                                                                            
==4281==    at 0x4C2596C: operator new(unsigned long) (vg_replace_malloc.c:220) 
                                                                                
                                                                                
                                                                            
==4281==    by 0x6F85405: 
__gnu_cxx::new_allocator<std::_List_node<osg::ref_ptr<osg::Texture::TextureObject>
 > >::allocate(unsigned long, void const*) (new_allocator.h:89)
==4281==    by 0x6F8411D: 
std::_List_base<osg::ref_ptr<osg::Texture::TextureObject>, 
std::allocator<osg::ref_ptr<osg::Texture::TextureObject> > >::_M_get_node() 
(stl_list.h:316)
==4281==    by 0x6F834BE: std::list<osg::ref_ptr<osg::Texture::TextureObject>, 
std::allocator<osg::ref_ptr<osg::Texture::TextureObject> > 
>::_M_create_node(osg::ref_ptr<osg::Texture::TextureObject> const&) 
(stl_list.h:461)
==4281==    by 0x6F828AE: std::list<osg::ref_ptr<osg::Texture::TextureObject>, 
std::allocator<osg::ref_ptr<osg::Texture::TextureObject> > 
>::_M_insert(std::_List_iterator<osg::ref_ptr<osg::Texture::TextureObject> >, 
osg::ref_ptr<osg::Texture::TextureObject> const&) (stl_list.h:1407)
==4281==    by 0x6F81831: std::list<osg::ref_ptr<osg::Texture::TextureObject>, 
std::allocator<osg::ref_ptr<osg::Texture::TextureObject> > 
>::push_back(osg::ref_ptr<osg::Texture::TextureObject> const&) (stl_list.h:920)
==4281==    by 0x6F7A638: 
osg::Texture::TextureObjectSet::orphan(osg::Texture::TextureObject*) 
(Texture.cpp:641)
==4281==    by 0x6F7B14F: 
osg::Texture::TextureObjectManager::releaseTextureObject(osg::Texture::TextureObject*)
 (Texture.cpp:839)
==4281==    by 0x6F7B89F: osg::Texture::releaseTextureObject(unsigned int, 
osg::Texture::TextureObject*) (Texture.cpp:930)
==4281==    by 0x6F7D104: osg::Texture::dirtyTextureObject() (Texture.cpp:1103)
==4281==    by 0x6F7C2CA: osg::Texture::~Texture() (Texture.cpp:991)
==4281==    by 0x6F717FC: osg::Texture2D::~Texture2D() (Texture2D.cpp:50)
==4281==
==4281== 128 (24 direct, 104 indirect) bytes in 1 blocks are definitely lost in 
loss record 52 of 77
==4281==    at 0x4C2596C: operator new(unsigned long) (vg_replace_malloc.c:220)
==4281==    by 0x6F85405: 
__gnu_cxx::new_allocator<std::_List_node<osg::ref_ptr<osg::Texture::TextureObject>
 > >::allocate(unsigned long, void const*) (new_allocator.h:89)
==4281==    by 0x6F8411D: 
std::_List_base<osg::ref_ptr<osg::Texture::TextureObject>, 
std::allocator<osg::ref_ptr<osg::Texture::TextureObject> > >::_M_get_node() 
(stl_list.h:316)
==4281==    by 0x6F834BE: std::list<osg::ref_ptr<osg::Texture::TextureObject>, 
std::allocator<osg::ref_ptr<osg::Texture::TextureObject> > 
>::_M_create_node(osg::ref_ptr<osg::Texture::TextureObject> const&) 
(stl_list.h:461)
==4281==    by 0x6F828AE: std::list<osg::ref_ptr<osg::Texture::TextureObject>, 
std::allocator<osg::ref_ptr<osg::Texture::TextureObject> > 
>::_M_insert(std::_List_iterator<osg::ref_ptr<osg::Texture::TextureObject> >, 
osg::ref_ptr<osg::Texture::TextureObject> const&) (stl_list.h:1407)
==4281==    by 0x6F81831: std::list<osg::ref_ptr<osg::Texture::TextureObject>, 
std::allocator<osg::ref_ptr<osg::Texture::TextureObject> > 
>::push_back(osg::ref_ptr<osg::Texture::TextureObject> const&) (stl_list.h:920)
==4281==    by 0x6F7A638: 
osg::Texture::TextureObjectSet::orphan(osg::Texture::TextureObject*) 
(Texture.cpp:641)
==4281==    by 0x6F7B14F: 
osg::Texture::TextureObjectManager::releaseTextureObject(osg::Texture::TextureObject*)
 (Texture.cpp:839)
==4281==    by 0x6F7B89F: osg::Texture::releaseTextureObject(unsigned int, 
osg::Texture::TextureObject*) (Texture.cpp:930)
==4281==    by 0x6F7D104: osg::Texture::dirtyTextureObject() (Texture.cpp:1103)
==4281==    by 0x6F7C2CA: osg::Texture::~Texture() (Texture.cpp:991)
==4281==    by 0x6F719C4: osg::Texture2D::~Texture2D() (Texture2D.cpp:50)
==4281==
==4281== 144 bytes in 1 blocks are definitely lost in loss record 54 of 77
==4281==    at 0x4C2596C: operator new(unsigned long) (vg_replace_malloc.c:220)
==4281==    by 0x6DB9B69: 
osg::GLBufferObjectManager::getGLBufferObjectManager(unsigned int) 
(BufferObject.cpp:1094)
==4281==    by 0x6DB9C1A: osg::GLBufferObject::deleteAllBufferObjects(unsigned 
int) (BufferObject.cpp:1105)
==4281==    by 0x6E76E90: osg::deleteAllGLObjects(unsigned int) 
(GLObjects.cpp:83)
==4281==    by 0x6E7A443: osg::GraphicsContext::close(bool) 
(GraphicsContext.cpp:536)
==4281==    by 0x4F3E643: osgViewer::Viewer::~Viewer() (Viewer.cpp:235)
==4281==    by 0x6F03E6F: osg::Referenced::signalObserversAndDelete(bool, bool) 
const (Referenced.cpp:319)
==4281==    by 0x4715B6: osg::Referenced::unref() const (Referenced:198)
==4281==    by 0x47BD2C: osg::ref_ptr<osgViewer::Viewer>::~ref_ptr() 
(ref_ptr:35)
==4281==    by 0x483B3A: osgVisual::dataIO_cluster::~dataIO_cluster() 
(dataIO_cluster.h:57)
==4281==    by 0x481B89: osgVisual::dataIO_clusterENet::~dataIO_clusterENet() 
(dataIO_clusterENet.cpp:34)
==4281==    by 0x6F03E6F: osg::Referenced::signalObserversAndDelete(bool, bool) 
const (Referenced.cpp:319)
==4281==
==4281== 144 bytes in 1 blocks are definitely lost in loss record 55 of 77
==4281==    at 0x4C2596C: operator new(unsigned long) (vg_replace_malloc.c:220)
==4281==    by 0x6F7B683: osg::Texture::getTextureObjectManager(unsigned int) 
(Texture.cpp:881)
==4281==    by 0x6F7B7A8: osg::Texture::deleteAllTextureObjects(unsigned int) 
(Texture.cpp:905)
==4281==    by 0x6E76E9A: osg::deleteAllGLObjects(unsigned int) 
(GLObjects.cpp:84)
==4281==    by 0x6E7A443: osg::GraphicsContext::close(bool) 
(GraphicsContext.cpp:536)
==4281==    by 0x4F3E643: osgViewer::Viewer::~Viewer() (Viewer.cpp:235)
==4281==    by 0x6F03E6F: osg::Referenced::signalObserversAndDelete(bool, bool) 
const (Referenced.cpp:319)
==4281==    by 0x4715B6: osg::Referenced::unref() const (Referenced:198)
==4281==    by 0x47BD2C: osg::ref_ptr<osgViewer::Viewer>::~ref_ptr() 
(ref_ptr:35)
==4281==    by 0x483B3A: osgVisual::dataIO_cluster::~dataIO_cluster() 
(dataIO_cluster.h:57)
==4281==    by 0x481B89: osgVisual::dataIO_clusterENet::~dataIO_clusterENet() 
(dataIO_clusterENet.cpp:34)
==4281==    by 0x6F03E6F: osg::Referenced::signalObserversAndDelete(bool, bool) 
const (Referenced.cpp:319)
==4281==
==4281== LEAK SUMMARY:
==4281==    definitely lost: 432 bytes in 6 blocks
==4281==    indirectly lost: 208 bytes in 2 blocks
==4281==      possibly lost: 0 bytes in 0 blocks
==4281==    still reachable: 31,223 bytes in 404 blocks
==4281==         suppressed: 0 bytes in 0 blocks
==4281== Reachable blocks (those to which a pointer was found) are not shown.
==4281== To see them, rerun with: --leak-check=full --show-reachable=yes
==4281==
==4281== For counts of detected and suppressed errors, rerun with: -v
==4281== ERROR SUMMARY: 692992 errors from 2368 contexts (suppressed: 7 from 7)





Thank you and have a nice weekend!

Cheers,
Torben

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





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

Reply via email to