Quantcast
Channel: WE MOVED to github.com/microsoft/cpprestsdk. This site is not monitored!
Viewing all articles
Browse latest Browse all 4845

New Post: Many memory leaks with MFC based application

$
0
0
Hi qt6hy,

There are no actual memory leaks going on here, this has to do with how MFC decides to measure and report leaks. When the MFC dll unloads it reports on all the remaining objects that haven't been deallocated yet. The C++ REST SDK dll contains some global objects that get destructed when the dll unloads. Unfortunately if the MFC dll unloads before the C++ REST SDK, or any other dll containing global objects, these will be reported as memory leaks. When in fact they are destructed and freed right after when the C++ REST SDK dll is unloaded.

Long story short the dll unload ordering has an impact on whether or not MFC reports leaks on global objects that are about the be freed. Here is a prior issue/discussion about this problem that you can take a look at for more information.

Steve

Viewing all articles
Browse latest Browse all 4845

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>