You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-dev@xerces.apache.org by Don Mastrovito <dm...@marathontechnologies.com> on 2001/11/13 15:07:30 UTC

Re: Freeing memory allocated by transcode() in Borland C++ Builder

Ralf,

If you use the BCB5 project files to build your copy of Xerces, the DLL 
produced will utilize the multi-threaded run time library CC3250MT.DLL and 
memory manager BORLNDMM.DLL supplied with your copy of C++Builder5.  I 
chose not to statically link these libraries with Xerces so applications 
and Xerces will use the same copy of the memory manager.  The -tWM switch 
tells the compiler that the target image is for Windows and is 
multi-threaded.  I believe this is the default setting for most 
projects.  Naturally, your application must use the same multi-threaded 
runtime and memory manager as the Xerces library.  If you are statically 
linking these into your application, that's the source of your problem.

I've read the most of the chatter about releasing memory returned by 
Transcode.  The problems seem to affect all build environments (VC++, Sun, 
etc.).  I have no reason to think what you are seeing is specific to the 
BCB build of Xerces.

BTW, I don't keep the BCB4 project up to date.  So if you are building with 
it, I'll lend words of wisdom, but you are largely on your own.  Sorry, but 
I no longer have BCB4 installed.

Don

At 06:02 PM 11/11/2001 +0100, you wrote:
>Hi,
>
>I just have a small problem with freeing the memory which was reserved
>by transcode(). The problem seems to be that my program just can't
>free the memory allocated by Xerces. I read about this problem very
>often here on the list and there was said, the solution is to use a
>multithreaded DLL version of the runtime library - but I couldn't find
>any option or something like this in C++ Builder. I found a flag
>called -tWM, but it doesn't help anything, the problem occurs even
>after a full build.
>Did anybody encountered the same problem with C++ Builder ?
>
>Regards,
>Ralf Ebert
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
>For additional commands, e-mail: xerces-c-dev-help@xml.apache.org

---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-c-dev-help@xml.apache.org