axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From di...@apache.org
Subject svn commit: r367595 - in /webservices/axis/trunk/c: build.xml build/buildXMLParser.xml src/xml/xerces/ParserLoader.cpp vc/xml/xerces/AxisXMLParserXml4c.dsp
Date Tue, 10 Jan 2006 13:30:12 GMT
Author: dicka
Date: Tue Jan 10 05:30:04 2006
New Revision: 367595

URL: http://svn.apache.org/viewcvs?rev=367595&view=rev
Log:
Resolve substantial memory leak seen when destroying an XML4C parser instance.
This has also required some minor build script changes, as the changes only work for XML4C
and not for Xerces-C.

Modified:
    webservices/axis/trunk/c/build.xml
    webservices/axis/trunk/c/build/buildXMLParser.xml
    webservices/axis/trunk/c/src/xml/xerces/ParserLoader.cpp
    webservices/axis/trunk/c/vc/xml/xerces/AxisXMLParserXml4c.dsp

Modified: webservices/axis/trunk/c/build.xml
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/c/build.xml?rev=367595&r1=367594&r2=367595&view=diff
==============================================================================
--- webservices/axis/trunk/c/build.xml (original)
+++ webservices/axis/trunk/c/build.xml Tue Jan 10 05:30:04 2006
@@ -179,6 +179,7 @@
 			<then>
 				<antcall target="compileAxisXMLParser" inheritall="true">
 					<!-- We can re-use the Xerces parser layer for XML4C -->
+                    <param name="isXML4C" value="true"/>
 					<param name="xmlParser" value="xerces"/>
 					<param name="dir.xmlParser" value="${xml4c.dir.xmlParser}"/>
 					<param name="xmlParserLibrary" value="${xml4c.xmlParserLibrary}"/>
@@ -197,17 +198,17 @@
 				</antcall>
 			</then>
 		</if>
-                <if>
-                        <equals arg1="${xmlParser.guththila}" arg2="true"/>
-                        <then>
-                                <antcall target="compileAxisXMLParser" inheritall="true">
-                                        <param name="xmlParser" value="guththila"/>
-                                        <param name="dir.xmlParser" value="${guththila.dir.xmlParser}"/>
-                                        <param name="xmlParserLibrary" value="${guththila.xmlParserLibrary}"/>
-                                        <param name="xmlParserLibraryName" value="${guththila.xmlParserLibraryName}"/>
-                                </antcall>
-                        </then>
-                </if>
+        <if>
+            <equals arg1="${xmlParser.guththila}" arg2="true"/>
+            <then>
+                <antcall target="compileAxisXMLParser" inheritall="true">
+                    <param name="xmlParser" value="guththila"/>
+                    <param name="dir.xmlParser" value="${guththila.dir.xmlParser}"/>
+                    <param name="xmlParserLibrary" value="${guththila.xmlParserLibrary}"/>
+                    <param name="xmlParserLibraryName" value="${guththila.xmlParserLibraryName}"/>
+                </antcall>
+            </then>
+        </if>
 	</target>
 
 	<target name="compile">

Modified: webservices/axis/trunk/c/build/buildXMLParser.xml
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/c/build/buildXMLParser.xml?rev=367595&r1=367594&r2=367595&view=diff
==============================================================================
--- webservices/axis/trunk/c/build/buildXMLParser.xml (original)
+++ webservices/axis/trunk/c/build/buildXMLParser.xml Tue Jan 10 05:30:04 2006
@@ -9,13 +9,13 @@
         <antcall target="buildVersionResource" inheritall="true">
             <param name="internalName" value="${xmlParserLibraryName}"/>
         </antcall>
-<!-- Before Using Guththila need to build it -->
-<!-- Starting Building Guththila -->
+	<!-- Before Using Guththila need to build it -->
+	<!-- Starting Building Guththila -->
     <if>
         <equals arg1="${xmlParser.guththila}" arg2="true"/>
 	<then>
 	<mkdir dir="${dir.xmlParser}/lib"/>
-                <if>
+        <if>
 			<not>
 				<isset property="aix"/>
 			</not>
@@ -36,11 +36,11 @@
 							<define name="AXISXMLPARSERXERCES_EXPORTS"/>
 						</defineset>
 					</compiler>
-                              <compiler refid="OS400icc"/>
-			            <defineset>
-			                  <define name="ENABLE_AXISTRACE" if="trace"/>
-			                  <define name="AXISTRACE_LIBRARY"/>
-			            </defineset>
+                    <compiler refid="OS400icc"/>
+		            <defineset>
+		                <define name="ENABLE_AXISTRACE" if="trace"/>
+		                <define name="AXISTRACE_LIBRARY"/>
+		            </defineset>
 
 					<!-- Additional include directory for XML Parser -->
 					<includepath path="${dir.xmlParser}"/>
@@ -50,12 +50,12 @@
 					<linker refid="LinuxLinker"/>
                     <linker refid="HP-UXLinker"/>            
 					<linker refid="AIXLinker"/>
-			            <linker extends="OS400Linker">
-                                 <linkerarg value="-qDUPPROC"/>
-                                 <linkerarg value="-qDUPVAR"/>
-                                 <linkerarg location="end" value="${dir.xmlParser}/lib/${xmlParser}.so"/>
-                              </linker>
-
+		            <linker extends="OS400Linker">
+					    <linkerarg value="-qDUPPROC"/>
+					    <linkerarg value="-qDUPVAR"/>
+					    <linkerarg location="end" value="${dir.xmlParser}/lib/${xmlParser}.so"/>
+					</linker>
+            
 					<!-- Additional library of XMLParser -->
 					<!-- Files to be compiled -->
 					<fileset dir="${dir.xmlParser}">
@@ -109,11 +109,12 @@
 							<define name="AXISXMLPARSERXERCES_EXPORTS"/>
 						</defineset>
 					</compiler>
-                              <compiler refid="OS400icc"/>
-			            <defineset>
-			                  <define name="ENABLE_AXISTRACE" if="trace"/>
-			                  <define name="AXISTRACE_LIBRARY"/>
-			            </defineset>
+                    <compiler refid="OS400icc"/>
+		            <defineset>
+	                   <define name="ENABLE_AXISTRACE" if="trace"/>
+	                   <define name="AXISTRACE_LIBRARY"/>
+                       <define name="AXIS_XML4C" if="isXML4C"/>
+		            </defineset>
 
 					<!-- Additional include directory for XML Parser -->
 					<includepath path="${dir.xmlParser}"/>
@@ -133,6 +134,7 @@
 
 					<!-- Additional library of XMLParser -->
 					<libset dir="${dir.xmlParser}/lib" libs="${xmlParserLibrary}" unless="os400"/>
+                    <libset dir="${dir.xmlParser}/lib" libs="icuuc" unless="os400" if="isXML4C"/>
 					<!-- Files to be compiled -->
 					<fileset dir="${dir.src}">
 						<include name="xml/${xmlParser}/*.cpp"/>
@@ -146,8 +148,9 @@
 				 	<!-- Compilers -->
 					<compiler refid="AIXxlc"/>
 			            <defineset>
-			                  <define name="ENABLE_AXISTRACE" if="trace"/>
-			                  <define name="AXISTRACE_LIBRARY"/>
+			                <define name="ENABLE_AXISTRACE" if="trace"/>
+			                <define name="AXISTRACE_LIBRARY"/>
+                            <define name="AXIS_XML4C" if="isXML4C"/>         
 			            </defineset>
 
 					<!-- Additional include directory for XML Parser -->
@@ -157,6 +160,7 @@
 					<linker refid="AIXLinker"/>
 					<!-- Additional library of XMLParser -->
 					<libset dir="${dir.xmlParser}/lib" libs="${xmlParserLibrary}"/>
+                    <libset dir="${dir.xmlParser}/lib" libs="icuuc" if="isXML4C"/>
           
 					<!-- Files to be compiled -->
 					<fileset dir="${dir.src}">
 						<include name="xml/${xmlParser}/*.cpp"/>

Modified: webservices/axis/trunk/c/src/xml/xerces/ParserLoader.cpp
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/c/src/xml/xerces/ParserLoader.cpp?rev=367595&r1=367594&r2=367595&view=diff
==============================================================================
--- webservices/axis/trunk/c/src/xml/xerces/ParserLoader.cpp (original)
+++ webservices/axis/trunk/c/src/xml/xerces/ParserLoader.cpp Tue Jan 10 05:30:04 2006
@@ -26,6 +26,10 @@
 #include "XMLParserXerces.h"
 #include <xercesc/util/PlatformUtils.hpp>
 
+#ifdef AXIS_XML4C
+#include <unicode/uclean.h>
+#endif
+
 extern "C" {
 STORAGE_CLASS_INFO
 int CreateInstance(XMLParser **inst)
@@ -49,6 +53,9 @@
 	/* TODO : Following uninitialization should be done within a function
 	          called by the library loader at unloading time */
 		XMLPlatformUtils::Terminate ();
+#ifdef AXIS_XML4C
+		u_cleanup();
+#endif
 		return AXIS_SUCCESS;
 	}
 	return AXIS_FAIL;

Modified: webservices/axis/trunk/c/vc/xml/xerces/AxisXMLParserXml4c.dsp
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/c/vc/xml/xerces/AxisXMLParserXml4c.dsp?rev=367595&r1=367594&r2=367595&view=diff
==============================================================================
--- webservices/axis/trunk/c/vc/xml/xerces/AxisXMLParserXml4c.dsp (original)
+++ webservices/axis/trunk/c/vc/xml/xerces/AxisXMLParserXml4c.dsp Tue Jan 10 05:30:04 2006
@@ -40,9 +40,10 @@
 # PROP Use_Debug_Libraries 0
 # PROP Output_Dir "Release"
 # PROP Intermediate_Dir "Release"
+# PROP Ignore_Export_Lib 0
 # PROP Target_Dir ""
 # ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D
"_USRDLL" /D "AXISXMLPARSERXML4C_EXPORTS" /YX /FD /c
-# ADD CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL"
/D "AXISXMLPARSERXML4C_EXPORTS" /YX /FD /c
+# ADD CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL"
/D "AXISXMLPARSERXML4C_EXPORTS" /D "AXIS_XML4C" /YX /FD /c
 # ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
 # ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
 # ADD BASE RSC /l 0x809 /d "NDEBUG"
@@ -52,7 +53,7 @@
 # ADD BSC32 /nologo
 LINK32=link.exe
 # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib
shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386
-# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib
ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386
+# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib
ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib  icuuc.lib /nologo /dll /machine:I386
 
 !ELSEIF  "$(CFG)" == "AxisXMLParserXml4c - Win32 Debug"
 
@@ -68,7 +69,7 @@
 # PROP Ignore_Export_Lib 0
 # PROP Target_Dir ""
 # ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS"
/D "_USRDLL" /D "AXISXMLPARSERXML4C_EXPORTS" /YX /FD /GZ /c
-# ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /I "../../../include" /D "WIN32" /D "_DEBUG" /D
"_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "AXISXMLPARSERXML4C_EXPORTS" /D "AXISTRACE_LIBRARY"
/FR /YX /FD /GZ /c
+# ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /I "../../../include" /D "WIN32" /D "_DEBUG" /D
"_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "AXISXMLPARSERXML4C_EXPORTS" /D "AXISTRACE_LIBRARY"
/D "AXIS_XML4C" /FR /YX /FD /GZ /c
 # ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32
 # ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32
 # ADD BASE RSC /l 0x809 /d "_DEBUG"
@@ -78,7 +79,7 @@
 # ADD BSC32 /nologo
 LINK32=link.exe
 # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib
shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386
/pdbtype:sept
-# ADD LINK32 xml4c_5D.lib /nologo /dll /debug /machine:I386 /out:"../../../bin/AxisXMLParser_D.dll"
/pdbtype:sept
+# ADD LINK32 xml4c_5D.lib icuuc.lib /nologo /dll /debug /machine:I386 /out:"../../../bin/AxisXMLParser_D.dll"
/pdbtype:sept
 
 !ENDIF 
 



Mime
View raw message