This project has moved and is read-only. For the latest updates, please go here.

static variables in 3rd party DLL

Mar 31, 2014 at 6:06 AM
I have a 3rd party dll that I cannot modify. The DLL has multiple static variables that are reported as leaked at exit. As I understood from multiple posts here, I need to recompile the DLL with #include "vld.h"
What else can be done if recompiling the dll isn't an option?
Mar 31, 2014 at 6:34 PM
Disable leak detection (VLDDisable) before loading dll and restore state after
Mar 31, 2014 at 9:30 PM
In my case I use it in a bit different way. All the leak detection is linked into my app as a static lib. The dll that's bothering me (QT) is liked dynamically by the OS. That is, the QT dlls are loaded before any of my CRT/VLD initialization are performed, and these DLL's are unloaded after all cleanup in my exe has finished.
Apr 4, 2014 at 4:46 PM
Edited Apr 4, 2014 at 4:46 PM
Than you can try call VLDMarkAllLeaksAsReported after initializing dll
Marked as answer by KindDragon on 4/4/2014 at 8:46 AM