have no idea, how redefining (or rather not defining) macros active for the application code could solve a memory leak report stemming from static data inside Ogre. 
At least for me, I had the same leak reports and they didn't go away with the given recipe. After some debugging, the reason for the reports turned out to be a loading order problem:
i) OgreMain_d.dll is loaded
ii) mfc80d.dll is loaded
iii) application runs...
iv) mfc80d.dll is unloaded
v) OgreMain_d.dll is unloaded.
The leak report occurs in stage (iv): MFC triggers a leak report without relying on the crt to do it at program shutdown. Thus, static data allocated by Ogre is reported as leaking (because OgreMain_d.dll is still active).
The solution is to force the linker to load MFC before Ogre, which can be done like this (only do this for debug builds):
i) in the General tab, switch "Use MFC in a shared DLL" to "Use Standard Windows Libraries"
ii) in the C/C++/Preprocessor tab, add _AFXDLL to the preprocessor definitions
iii) in the Linker/Input tab, add mfc80d.lib anywhere before OgreMain_d.lib
Only doing the last step won't help - the general setting takes precedence.
At least for me, I had the same leak reports and they didn't go away with the given recipe. After some debugging, the reason for the reports turned out to be a loading order problem:
i) OgreMain_d.dll is loaded
ii) mfc80d.dll is loaded
iii) application runs...
iv) mfc80d.dll is unloaded
v) OgreMain_d.dll is unloaded.
The leak report occurs in stage (iv): MFC triggers a leak report without relying on the crt to do it at program shutdown. Thus, static data allocated by Ogre is reported as leaking (because OgreMain_d.dll is still active).
The solution is to force the linker to load MFC before Ogre, which can be done like this (only do this for debug builds):
i) in the General tab, switch "Use MFC in a shared DLL" to "Use Standard Windows Libraries"
ii) in the C/C++/Preprocessor tab, add _AFXDLL to the preprocessor definitions
iii) in the Linker/Input tab, add mfc80d.lib anywhere before OgreMain_d.lib
Only doing the last step won't help - the general setting takes precedence.
http://www.ogre3d.org/phpBB2/viewtopic.php?t=32675&view=next&sid=ce193664e1d3d7c4af509e6f4e2718c6
 
                     
                    
                 
                    
                 
         
