Each runtime (debug vs, non-debug, dll vs. static, threaded vs non-threaded, and each combo thereof) each has its own memory manager, becuase its a completely different chunk o' code. So, if one DLL linked to one variant and another DLL or exe linked to another, and the first DLL allocates something, that comes from its memory manager. If its given to the other DLL or Exe, and they try to delete it, that second DLL or Exe's memory manager doesn't have a clue where this memory came from.
So, you need to use a consistent memory model within all of the DLLs and the Exe, or you always give back memory to whoever allocated it and let them delete it (if the DLL is a closed box wrt to allocated memory then it doesn't matter). Xerces takes the far more convenient and simple approach that you should use a consistent memory model throughout. -------------------------- Dean Roddey The Charmed Quark Controller Charmed Quark Software [EMAIL PROTECTED] http://www.charmedquark.com "If it don't have a control port, don't buy it!" ----- Original Message ----- From: "Rhys Black" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Sunday, April 07, 2002 7:27 PM Subject: RE: FYI - small bug? > > --- urs muff <[EMAIL PROTECTED]> wrote: > > The problem is the following: > > If one DLL is allocating memory no other DLL > > including the main application > > can free that memory. This is a general issue with > > all memory managers on > > many platforms. > > Okay, I get that... > > > The solution is to use a DLL > > version for the memory manager > > [MSVCRTD.dll/MSVCRT.dll]. > > Ya lost me, here. > > > This only works, if the > > DLL/EXE that is freeing > > the memory is using the same shared CRT > > implementation, check your 'code > > generation' settings. If you are using Borland as > > compiler, you might have > > to recompile the Xerces DLL using the Borland > > settings for shared CRT, since > > the precompiled distribution was compiled using MSVC > > 6.0. [You will run in > > the same problem under MacOS, if you don't use the > > shared version of the MSL > > libraries...] > > hmm... all right. I got the build for BCB5, so I'm > hoping that it wasn't meant for use with BCB6 (I > believe that BCB6 was not out at the build time of the > one I have - for reference, I have 1_6_0; Don advised > that I stick with that build, if I am building with > BCB5 ). I am not a total whiz with my compiler, yet, > only having had it for a few months... I'm afraid that > someone will have to break it down just a little more > for me to be able to solve this. Regardless, I'll do > my best. > > Thanks for the help, everyone - I appreciate it. I'll > do my best to offer what help to others I may be in a > position to, in the future. > > ~Rhys Black > > __________________________________________________ > Do You Yahoo!? > Yahoo! Tax Center - online filing with TurboTax > http://taxes.yahoo.com/ > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
