I have overloaded global new/delete (and new[] / delete[]) to fill and check guarded blocks. Works fine. Now i link to C++ DLLs passing STL-Container instances that are filled or modified by the DLLs. When destructing these containers i run into an error, as they were not allocated using my overloaded new operator and vice versa the dlls generate errors when freeing container elements that were created using my overloaded new.
How can i make DLLs call my new operator? For some DLLs i have the sources, for others i don't have it.
There must be a overall approach as i.e. the Visual Studio Runtime DLLs MSVCP*.DLL call my overloaded operators. How can i make other DLLs call my operators too?
a) With having the sources for the DLL? and check b) Without the sources for the DLL?