You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xerces.apache.org by tn...@apache.org on 2001/08/02 21:00:47 UTC

cvs commit: xml-xerces/c/src/parsers SAX2XMLReaderImpl.cpp

tng         01/08/02 12:00:47

  Modified:    c/src/parsers SAX2XMLReaderImpl.cpp
  Log:
  [Bug 1329] SAX2XMLReaderImpl leaks XMLBuffers.
  
  Revision  Changes    Path
  1.17      +14 -0     xml-xerces/c/src/parsers/SAX2XMLReaderImpl.cpp
  
  Index: SAX2XMLReaderImpl.cpp
  ===================================================================
  RCS file: /home/cvs/xml-xerces/c/src/parsers/SAX2XMLReaderImpl.cpp,v
  retrieving revision 1.16
  retrieving revision 1.17
  diff -u -r1.16 -r1.17
  --- SAX2XMLReaderImpl.cpp	2001/08/01 19:11:02	1.16
  +++ SAX2XMLReaderImpl.cpp	2001/08/02 19:00:46	1.17
  @@ -56,6 +56,9 @@
   
   /*
    * $Log: SAX2XMLReaderImpl.cpp,v $
  + * Revision 1.17  2001/08/02 19:00:46  tng
  + * [Bug 1329] SAX2XMLReaderImpl leaks XMLBuffers.
  + *
    * Revision 1.16  2001/08/01 19:11:02  tng
    * Add full schema constraint checking flag to the samples and the parser.
    *
  @@ -758,6 +761,17 @@
   
       // Make sure our element depth flag gets set back to zero
       fElemDepth = 0;
  +
  +    // Pop any prefix buffers left over from previous uses
  +    while (!prefixCounts->empty())
  +    {
  +        unsigned int numPrefix = prefixCounts->pop();
  +        for (unsigned int i = 0; i < numPrefix; i++)
  +        {
  +            XMLBuffer * buf = fPrefixes->pop() ;
  +            fStringBuffers.releaseBuffer(*buf) ;
  +        }
  +    }
   }
   
   
  
  
  

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