[osg-users] New way to workaround MSVC False Positives

Can T. Oguz ctoguz at gmail.com
Fri Mar 27 00:34:02 PDT 2009


I mean memory leak reports. Check out the previous posts :

http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/2008-July/014323.html
http://www.mail-archive.com/osg-users@lists.openscenegraph.org/msg22588.html

Can

2009/3/26 Tueller, Shayne R Civ USAF AFMC 519 SMXS/MXDEC <
Shayne.Tueller at hill.af.mil>

> Thanks for the info. I'm using XP SP3, MSVC 2008.
>
> Perhaps you could elaborate on what you mean by "false positives" or what
> the symptoms are that you're seeing...
>
> -Shayne
>
> -----Original Message-----
> From: osg-users-bounces at lists.openscenegraph.org
> [mailto:osg-users-bounces at lists.openscenegraph.org] On Behalf Of Can T.
> Oguz
> Sent: Thursday, March 26, 2009 10:41 AM
> To: OpenSceneGraph Users
> Subject: Re: [osg-users] New way to workaround MSVC False Positives
>
> Sorry, forgot to mention : Vista SP1, MSVC 2008. Have you tried it?
>
> Can
>
>
> 2009/3/26 Tueller, Shayne R Civ USAF AFMC 519 SMXS/MXDEC
> <Shayne.Tueller at hill.af.mil>
>
>
>        What version of Visual Studio are you using?
>
>        -Shayne
>
>
>        -----Original Message-----
>        From: osg-users-bounces at lists.openscenegraph.org
>        [mailto:osg-users-bounces at lists.openscenegraph.org] On Behalf Of
> Can
> T. Oguz
>        Sent: Thursday, March 26, 2009 10:25 AM
>        To: OpenSceneGraph Users
>        Subject: [osg-users] New way to workaround MSVC False Positives
>
>        Hi OSG Users,
>
>        I think I've found an easier work around to overcome the MSVC false
>        positives. I had been using the prescription at
>        http://www.vis-sim.com/3dsceneBB/viewtopic.php?t=1027 to avoid the
> leak
>        false positives for my desktop application and it worked perfectly
> but now
>        I've packed the source into an MFC ActiveX and I saw that all leaks
> came
>        back. So I've removed all the additional dependencies and linked the
> dlls by
>        the directives and all the false positives are gone. I've tested the
> leak
>        detection and it worked ok.
>
>        The new workaround is :
>
>        . Goto project settings. In there, make the following changes for
> theDebug
>        build.
>        . General->Use of MFC->Use Standard Windows Libraries.
>        . Add _AFXDLL to C/C++->Preprocessor->Preprocessor Definitions.
>        . Add the following pragma directives to stdafx.h right after the
> MFC
>        includes:
>
>        #ifdef _DEBUG
>         #pragma comment(lib, "OpenThreadsd.lib")
>         #pragma comment(lib, "osgd.lib")
>         #pragma comment(lib, "osgDBd.lib")
>         #pragma comment(lib, "osgUtild.lib")
>         #pragma comment(lib, "osgGAd.lib")
>         #pragma comment(lib, "osgViewerd.lib")
>         #pragma comment(lib, "osgTextd.lib")
>         #pragma comment(lib, "osgSimd.lib")
>        #else
>         #pragma comment(lib, "OpenThreads.lib")
>         #pragma comment(lib, "osg.lib")
>         #pragma comment(lib, "osgDB.lib")
>         #pragma comment(lib, "osgUtil.lib")
>         #pragma comment(lib, "osgGA.lib")
>         #pragma comment(lib, "osgViewer.lib")
>         #pragma comment(lib, "osgText.lib")
>         #pragma comment(lib, "osgSim.lib")
>        #endif
>
>        #pragma comment(lib, "opengl32.lib")
>        #pragma comment(lib, "glu32.lib")
>
>        Regards,
>
>        Can
>
>
>
>
>
>        _______________________________________________
>        osg-users mailing list
>        osg-users at lists.openscenegraph.org
>
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
>
>
>
>
> _______________________________________________
> osg-users mailing list
> osg-users at lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/attachments/20090327/a6056946/attachment-0003.htm>


More information about the osg-users mailing list