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 bu...@apache.org on 2003/03/17 04:17:52 UTC

DO NOT REPLY [Bug 18051] New: - memory leakage in XMLFormatter

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=18051>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=18051

memory leakage in XMLFormatter

           Summary: memory leakage in XMLFormatter
           Product: Xerces-C++
           Version: Nightly build (please specify the date)
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: Normal
          Priority: Other
         Component: Miscellaneous
        AssignedTo: xerces-c-dev@xml.apache.org
        ReportedBy: zhangpy@hotmail.com


The getCharRef() is used to get a character reference (in the output 
encoding)for a predefined character entity, say &lt;, and the fLTRef is used to 
point to the newly memory (which contains the string representing the character 
reference) so that subsequent calls to the getCharRef() for the same predefined 
character (say &lt;), the string (pointed to by fLTRef) will be used (thus to 
avoid generating the same string again and again). And the memory allocated 
will be de-allocated in the destructor.

    But in fact, the getCharRef() fails to assign the newly allocated memory to 
fLTRef (and other f**Ref as well), and therefore there are multiple generation 
of the same string, and the memory associated are never released.

Rgds,
PeiYong

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