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.  The solution is to use a DLL version for the memory manager
[MSVCRTD.dll/MSVCRT.dll].  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...]

- URS C. MUFF
SOFTWARE ENGINEER       - R&D / XPRESS
[EMAIL PROTECTED] - X6360
+1 (303) 894 3360

 -----Original Message-----
From:   Rhys Black [mailto:[EMAIL PROTECTED]] 
Sent:   Monday, April 01, 2002 1:20 PM
To:     [EMAIL PROTECTED]
Subject:        Re: FYI - small bug?


--- "Jason E. Stewart" <[EMAIL PROTECTED]>
wrote:
> "Rhys Black" <[EMAIL PROTECTED]> writes:
> 
> >     char *p = s.transcode();
> >     target << p;
> >     return target;
> >     delete [] p;
> > }
> > 
> > I copied this code from the DOMPrint example.  The
> > error seems to be in deleting variable p.  I think
> the
> > problem is that variable p does not need to be
> > deleted, seeing as how it was not new-ed onto the
> > stack.  
> 
> Not true, transcode() allocates memory and it is up
> to the caller to
> free it.
> 
> jas.
ah -  thanks!

I'll look into the code for transcode(), but my
compiler BCB5 throws an error message at run time that
interrupts execution at the line deleting pointer p. 
When that line is deleted, there is no problem.

Any thoughts?
~Rhys Black


__________________________________________________
Do You Yahoo!?
Yahoo! Greetings - send holiday greetings for Easter, Passover
http://greetings.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]

Reply via email to