Re: [osg-users] memory leak in osg 2.8.2 ?

2009-10-19 Thread Sebastien Nerig
Hi Chris, Great ! thx a lot for your usefull help I didnt know this function, that works well Thank you again! Sebastien -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=18382#18382 ___ osg-users mai

Re: [osg-users] memory leak in osg 2.8.2 ?

2009-10-19 Thread Chris Denham
Hi Sebastien, Hmmm, just looking my code again and realized I didn't actually perform the check directly. I delay the leak check until nearer termination using _CrtSetDbgFlag. e.g.: Code: ~TheEnd() { _CrtSetDbgFlag(_CRTDBG_LEAK_CHECK_DF); } Seems to work ok for me in VS2005. Cheers, Chris

Re: [osg-users] memory leak in osg 2.8.2 ?

2009-10-19 Thread Sebastien Nerig
Hi Chris, thx for your answer and your "trick" ! :) but it is the same for me... > struct TheEnd > { >~TheEnd() >{ > _CrtDumpMemoryLeaks(); >} > }; > > TheEnd theEnd; > > int _tmain(int argc, _TCHAR* argv[]) > { >osg::ref_ptr< osg::Group> gr; >return 0; > } > D

Re: [osg-users] memory leak in osg 2.8.2 ?

2009-10-16 Thread Chris Denham
The trick, if I can call it that, is to perform the leak check in the destructor of the last destroyed object. Works for me! You just need to make sure your global heap check object is created before OSG gets to make its evil singletons ;-) . e.g. Code: struct TheEnd { ~TheEnd() { CheckForLe

Re: [osg-users] memory leak in osg 2.8.2 ?

2009-10-16 Thread Sebastien Nerig
Hi Bryan, ok thx for your answer (even if I do not understand the 1st part of your message?) I did some research on the forum before posting, but maybe it wasn't enought. Thank you! Cheers, Sebastien -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.

Re: [osg-users] memory leak in osg 2.8.2 ?

2009-10-09 Thread Thrall, Bryan
Sebastien Nerig wrote on Friday, October 09, 2009 9:50 AM: > Hi, > > I take an osg example (I tried with the osgTeapot example project), then I > add the command > > Code: > viewer.run(); > _CrtDumpMemoryLeaks(); > return 0; > > at the end of the main function. (it dumps all the memory blocks

[osg-users] memory leak in osg 2.8.2 ?

2009-10-09 Thread Sebastien Nerig
Hi, I take an osg example (I tried with the osgTeapot example project), then I add the command Code: viewer.run(); _CrtDumpMemoryLeaks(); return 0; at the end of the main function. (it dumps all the memory blocks in the debug heap when a memory leak has occurred) I launch it in debug mode, th