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/02/27 14:23:02 UTC

cvs commit: xml-xerces/c/src/xercesc/com xml4com.cpp XMLDOMDocument.cpp

amassari    2004/02/27 05:23:02

  Modified:    c/src/xercesc/com xml4com.cpp XMLDOMDocument.cpp
  Log:
  Fixed memory leaks
  
  Revision  Changes    Path
  1.4       +6 -0      xml-xerces/c/src/xercesc/com/xml4com.cpp
  
  Index: xml4com.cpp
  ===================================================================
  RCS file: /home/cvs/xml-xerces/c/src/xercesc/com/xml4com.cpp,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- xml4com.cpp	25 Feb 2004 18:38:33 -0000	1.3
  +++ xml4com.cpp	27 Feb 2004 13:23:02 -0000	1.4
  @@ -56,6 +56,9 @@
   
   /*
    * $Log$
  + * Revision 1.4  2004/02/27 13:23:02  amassari
  + * Fixed memory leaks
  + *
    * Revision 1.3  2004/02/25 18:38:33  amassari
    * The COM wrapper doesn't use the deprecated DOM anymore
    *
  @@ -248,7 +251,10 @@
   		XMLPlatformUtils::Initialize();
       }
       else if (dwReason == DLL_PROCESS_DETACH)
  +    {
  +        XMLPlatformUtils::Terminate();
           _Module.Term();
  +    }
       return TRUE;    // ok
   }
   
  
  
  
  1.6       +11 -1     xml-xerces/c/src/xercesc/com/XMLDOMDocument.cpp
  
  Index: XMLDOMDocument.cpp
  ===================================================================
  RCS file: /home/cvs/xml-xerces/c/src/xercesc/com/XMLDOMDocument.cpp,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- XMLDOMDocument.cpp	25 Feb 2004 18:38:33 -0000	1.5
  +++ XMLDOMDocument.cpp	27 Feb 2004 13:23:02 -0000	1.6
  @@ -176,6 +176,10 @@
   		m_pOnTransformNode = NULL;
   	}
   
  +    if(m_Document)
  +        delete m_Document;
  +    m_Document = NULL;
  +
   	DestroyWindow();
   }
   
  @@ -224,6 +228,8 @@
   	if (m_lReadyState != 4)
   		return 1L;
   
  +    if(m_Document)
  +        delete m_Document;
   	m_Document = m_TmpDocument;
   	m_TmpDocument = 0;
   	
  @@ -1150,6 +1156,8 @@
   	if (m_bParseError)
   		return hr;
   
  +    if(m_Document)
  +        delete m_Document;
   	m_Document = m_TmpDocument;
   	m_TmpDocument = 0;
   	
  @@ -1337,6 +1345,8 @@
   	if (m_bParseError)
   		return hr;
   
  +    if(m_Document)
  +        delete m_Document;
   	m_Document = m_TmpDocument;
   	m_TmpDocument = 0;
   	
  
  
  

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