Hi Amir,

Quoting amir <[email protected]>:
Env: Win7/64bit/MSVC 2008/OSG3.0.1
I make unusual use of OSG - in every iteration I set new parameters,
then I read the results to images and use them (no graphic display is required!)
I have my app keep growing all the time...
Any suggestion?

I'm using the OSG smart pointers (ref_ptr) well - following the doc.
DevPartner Memory analyzer reports any space allocated and assigned to ref_ptr as a leak, but I assume it couldn't handle it... Except that, it doesn't find any leak. I just see the process keeps growing in the TaskManager.

Schematically, I do the following (pseudo-code):
(notice all required objects are ref_ptr in my real code)

ref_ptr<osgViewer::Viewer> viewer = new osgViewer::Viewer;
ref_ptr<osg::Image> colorImage = new osg::Image;
ref_ptr<osg::Image> depthImage = new osg::Image;

viewer->setScheneData(model);

foreach givenViewport
{
  // create 'traits' with some values, inc. target = FRAME_BUFFER_OBJECT
  gc = osg::GraphicsContext::createGraphicsContext(traits.get())
  camera = viewer->getCamera()
  camera->setGraphicsContext(gc)

Are you doing this for every frame/iteration? Your code sample doesn't make it obvious.
I could imagine creating a new context every frame to leak GL resources...

Cheers,
/ulrich

Attachment: pgpCAseaxz6Iu.pgp
Description: PGP Digital Signature

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

Reply via email to