You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xerces.apache.org by am...@apache.org on 2004/12/06 11:47:01 UTC

cvs commit: xml-xerces/c/src/xercesc/util XMLString.cpp XMLString.hpp

amassari    2004/12/06 02:47:01

  Modified:    c/src/xercesc/util XMLString.cpp XMLString.hpp
  Log:
  Added XMLString::release(void**, MemoryManager*) [jira# 1301]
  
  Revision  Changes    Path
  1.39      +7 -1      xml-xerces/c/src/xercesc/util/XMLString.cpp
  
  Index: XMLString.cpp
  ===================================================================
  RCS file: /home/cvs/xml-xerces/c/src/xercesc/util/XMLString.cpp,v
  retrieving revision 1.38
  retrieving revision 1.39
  diff -u -r1.38 -r1.39
  --- XMLString.cpp	18 Nov 2004 01:35:20 -0000	1.38
  +++ XMLString.cpp	6 Dec 2004 10:47:01 -0000	1.39
  @@ -1878,6 +1878,12 @@
       *buf = 0;
   }
   
  +void XMLString::release(void** buf, MemoryManager* const manager)
  +{
  +    manager->deallocate(*buf);
  +    *buf = 0;
  +}
  +
   // ---------------------------------------------------------------------------
   //  XMLString: Private static methods
   // ---------------------------------------------------------------------------
  
  
  
  1.29      +16 -0     xml-xerces/c/src/xercesc/util/XMLString.hpp
  
  Index: XMLString.hpp
  ===================================================================
  RCS file: /home/cvs/xml-xerces/c/src/xercesc/util/XMLString.hpp,v
  retrieving revision 1.28
  retrieving revision 1.29
  diff -u -r1.28 -r1.29
  --- XMLString.hpp	8 Sep 2004 13:56:24 -0000	1.28
  +++ XMLString.hpp	6 Dec 2004 10:47:01 -0000	1.29
  @@ -16,6 +16,9 @@
   
   /*
    * $Log$
  + * Revision 1.29  2004/12/06 10:47:01  amassari
  + * Added XMLString::release(void**, MemoryManager*) [jira# 1301]
  + *
    * Revision 1.28  2004/09/08 13:56:24  peiyongz
    * Apache License Version 2.0
    *
  @@ -1544,6 +1547,19 @@
        * @param buf  The string to be deleted and become a null pointer.
        */
       static void release(XMLByte** buf);
  +
  +    /**
  +     * Release the parameter string that was allocated using the version of XMLString::transcode
  +     * that accepts a MemoryManager.
  +     * The implementation will call MemoryManager::deallocate and then turn the string to a null pointer.
  +     *
  +     * @param buf  The string to be deleted and become a null pointer.
  +     */
  +    static void release
  +    (
  +        void**  buf
  +        ,       MemoryManager* const manager
  +    );
   
       //@}
   
  
  
  

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