You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xerces.apache.org by pe...@apache.org on 2001/10/25 23:52:28 UTC

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

peiyongz    01/10/25 14:52:28

  Modified:    c/src/util PlatformUtils.cpp PlatformUtils.hpp
  Log:
  XMLDeleterFor related functions and data are removed.
  
  Revision  Changes    Path
  1.16      +3 -51     xml-xerces/c/src/util/PlatformUtils.cpp
  
  Index: PlatformUtils.cpp
  ===================================================================
  RCS file: /home/cvs/xml-xerces/c/src/util/PlatformUtils.cpp,v
  retrieving revision 1.15
  retrieving revision 1.16
  diff -u -r1.15 -r1.16
  --- PlatformUtils.cpp	2001/10/24 19:59:49	1.15
  +++ PlatformUtils.cpp	2001/10/25 21:52:28	1.16
  @@ -56,6 +56,9 @@
   
   /*
    * $Log: PlatformUtils.cpp,v $
  + * Revision 1.16  2001/10/25 21:52:28  peiyongz
  + * XMLDeleterFor related functions and data are removed.
  + *
    * Revision 1.15  2001/10/24 19:59:49  peiyongz
    * [Bug 3975] gInitFlag problem
    *
  @@ -145,7 +148,6 @@
   //      the static data of the platform utilities class and here locally.
   // ---------------------------------------------------------------------------
   static XMLMutex*                gSyncMutex = 0;
  -static RefVectorOf<XMLDeleter>* gLazyData;
   static long                     gInitFlag = 0;
   
   // ---------------------------------------------------------------------------
  @@ -214,9 +216,6 @@
   	// Create the mutex for the static data cleanup list
       gXMLCleanupListMutex = new XMLMutex;
   
  -    // Create the array for saving lazily allocated objects to be deleted at termination
  -    gLazyData= new RefVectorOf<XMLDeleter>(512);
  -
       //
       //  Ask the per-platform code to make the desired transcoding service for
       //  us to use. This call cannot throw any exceptions or do anything that
  @@ -276,14 +275,6 @@
       fgNetAccessor = 0;
   
       //
  -    //  Call the method that cleans up the registered lazy eval objects.
  -    //  This is all higher level code which might try to report errors if
  -    //  they have problems, so we want to do this before we hose our
  -    //  fundamental bits and pieces.
  -    //
  -    cleanupLazyData();
  -
  -    //
       //  Call some other internal modules to give them a chance to clean up.
       //  Do the string class last in case something tries to use it during
       //  cleanup.
  @@ -332,45 +323,6 @@
       //  works or not. That's their decision.
       //
       return loadAMsgSet(msgDomain);
  -}
  -
  -
  -// ---------------------------------------------------------------------------
  -//  XMLPlatformUtils: Lazy eval methods
  -// ---------------------------------------------------------------------------
  -void XMLPlatformUtils::registerLazyData(XMLDeleter* const deleter)
  -{
  -    // Just add a copy of this object to the vector. MUST be synchronized
  -    XMLMutexLock lock(gSyncMutex);
  -    gLazyData->addElement(deleter);
  -}
  -
  -
  -void XMLPlatformUtils::cleanupLazyData()
  -{
  -    //
  -    //  Loop through the vector and try to delete each object. Use a try
  -    //  block so that we don't fall out prematurely if one of them hoses.
  -    //  Note that we effectively do them in reverse order of their having
  -    //  been registered.
  -    //
  -    //  Also, note that we don't synchronize here because this is happening
  -    //  during shutdown.
  -    //
  -    while (gLazyData->size())
  -    {
  -        try
  -        {
  -            gLazyData->removeLastElement();
  -        }
  -
  -        catch(...)
  -        {
  -            // We don't try to report errors here, just fall through
  -        }
  -    }
  -    delete gLazyData;
  -    gLazyData = 0;
   }
   
   // ---------------------------------------------------------------------------
  
  
  
  1.12      +1 -11     xml-xerces/c/src/util/PlatformUtils.hpp
  
  Index: PlatformUtils.hpp
  ===================================================================
  RCS file: /home/cvs/xml-xerces/c/src/util/PlatformUtils.hpp,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- PlatformUtils.hpp	2001/05/11 13:26:28	1.11
  +++ PlatformUtils.hpp	2001/10/25 21:52:28	1.12
  @@ -55,7 +55,7 @@
    */
   
   /*
  - * $Id: PlatformUtils.hpp,v 1.11 2001/05/11 13:26:28 tng Exp $
  + * $Id: PlatformUtils.hpp,v 1.12 2001/10/25 21:52:28 peiyongz Exp $
    */
   
   
  @@ -532,16 +532,6 @@
         */
       static bool isNELRecognized();
       //@}
  -
  -    //
  -    //  For internal use only.
  -    //
  -    //  The parser creates a good bit of static/global data lazily, to
  -    //  avoid order of creation issues. Those objects can be registered
  -    //  here to be cleaned up during the Terminate() call.
  -    ///
  -    static void registerLazyData(XMLDeleter* const deleter);
  -    static void cleanupLazyData();
   
   
   private :
  
  
  

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