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
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
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
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
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.
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
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
7 matches
Mail list logo