Memory leaks on deconstruction

I’m having some issues with my control panel
i had to fold our audio driver in so i could make calls the hardware when i did so i get these linker errors.

error LNK2005: “void * __cdecl operator new[](unsigned int)” (??_U@YAPAXI@Z) already defined in nafxcw.lib(afxmem.obj)

error LNK2005: “void __cdecl operator delete[](void *)” (??_V@YAXPAX@Z) already defined in nafxcw.lib(afxmem.obj)

to fix this i use this option in the linker /FORCE:MULTIPLE

but now after debugging the app when i close it the compiler detects many memory leaks has anyone encountered an issue like this?


Must be some of the templated classes getting multiply implemented.

Have you made sure you always include juce.h after all your windows header files?

This sounds like you’re using MFC (afx prefix is for MFC). Please make sure you are not using MFC in the project Setting (Don’t use MFC) dialog.

Else, you shouldn’t use Force:Multiple but /ignore:lib directive.