Hi Toni,
Antonio Bleile wrote:
> Hi,
>
> I'm currently monitoring the memory consumption
> of my program. The program loads several models
> from disk and renders a small preview for each
> of them. I use a separately allocated pbuffer
> for that. After start-up the mem consumption
> is e.g. 311MB. If I don't do the preview rendering
> I get a consumption of 258MB. So I guess something
> is leaking in the preview code. All I do is to pass
> a clone of the node to the SimpleSceneManager associated
> to the pbuffer and set-up the root node:
>
> // make pbuffer context current
> m_pBuffer->makeCurrent();
>
> NodePtr cloned = node->clone();
>
> m_pMgr->setRoot( cloned );
> m_pMgr->showAll();
> m_pMgr->redraw();
>
> // force subChild of cloned node,
> // setting a dummy node (created once with makeSphere() )
> m_pMgr->setRoot( dummyRoot );
>
>
> Is there anything wrong with this code? Could it be some
> OpenGL displaylist not cleant up?
OpenGL keeps copies of the dlists for each Context. In theory you can share
them, but at this point OpenSG does not support that. When you close the
PBuffer
this memory should be released, but normally it is not given back to the OS, it
will just be used to satisfy later memory allocations, so the process size will
probably not shrink.
Yours
Dirk
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Opensg-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensg-users