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; } Detected memory

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,

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:

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() {

[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,