Linking DLL into plugin

I’ve built a DLL using 2015 CRT \MD libraries… I’m running into issues of deallocation however. I think this has something to do with the different heap spaces where the DLL has its own and the UE application has its own as well…
I’ve posed on stack overflow here: c++ - Deallocate from dll spawns a crash - Stack Overflow
How do I resolve this?