Hi Christoph, This is what we have to do to solve our current corrupt memory problems on Win32:
> Allocating in the exe and freeing in the DLL is only possible if both of > them are using the exact same instance of the C runtime lib. That means > they both must use the exact same DLL version of the lib. You can't mix > single with multi threaded, you can't mix release with debug. Make the > debug builds match, and make the release builds match, and don't mix a > debug exe with a release DLL or vice versa. > > All this is a bad idea if the DLL is ever going to be used by some other > program. It works only if you combine all the pieces just right! > > -- > Scott McPhillips [VC++ MVP] I'll see if I can have a look at this and which run-time library we should use for each one. Alex. > Hi, > > > Damn I got a quick answer from the ng! Here's why you're getting the error. > > Don't create pointers in the main thread and then free them in the DLL, > > because they probably don't share the same memory space. > > OK, so the fix for this would be to put sci_memory.c into the library and > always use its functions if defined(_MSC_VER)? > > llap, > Christoph > >
