You are viewing a plain text version of this content. The canonical link for it is here.
Posted to axis-cvs@ws.apache.org by da...@apache.org on 2004/05/10 13:16:33 UTC
cvs commit: ws-axis/c/src/engine Axis.cpp
damitha 2004/05/10 04:16:33
Modified: c/src/soap SoapKeywordMapping.h SoapKeywordMapping.cpp
c/src/engine Axis.cpp
Log:
memory leaks patches for client side submitted by Samisa was applied
Revision Changes Path
1.9 +4 -1 ws-axis/c/src/soap/SoapKeywordMapping.h
Index: SoapKeywordMapping.h
===================================================================
RCS file: /home/cvs/ws-axis/c/src/soap/SoapKeywordMapping.h,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- SoapKeywordMapping.h 26 Apr 2004 04:04:37 -0000 1.8
+++ SoapKeywordMapping.h 10 May 2004 11:16:33 -0000 1.9
@@ -17,6 +17,7 @@
#if !defined(AXIS_SOAPKEYWORDMAPPING_H__OF_AXIS_INCLUDED_)
#define AXIS_SOAPKEYWORDMAPPING_H__OF_AXIS_INCLUDED_
+#include "../common/AxisUtils.h"
#include <axis/server/SoapEnvVersions.h>
#include <map>
@@ -43,11 +44,13 @@
SoapKeywordMapping();
virtual ~SoapKeywordMapping();
private:
- static map<int, SoapKeywordStruct> m_Map;
+ //static map<int, SoapKeywordStruct> m_Map;
+ static SoapKeywordStruct m_Map[VERSION_LAST];
static volatile bool m_bInit;
public:
static void initialize();
static const SoapKeywordStruct& map(int nVersion);
+ static void uninitialize();
};
#endif
1.9 +18 -1 ws-axis/c/src/soap/SoapKeywordMapping.cpp
Index: SoapKeywordMapping.cpp
===================================================================
RCS file: /home/cvs/ws-axis/c/src/soap/SoapKeywordMapping.cpp,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- SoapKeywordMapping.cpp 26 Apr 2004 04:04:37 -0000 1.8
+++ SoapKeywordMapping.cpp 10 May 2004 11:16:33 -0000 1.9
@@ -23,7 +23,8 @@
#include <axis/server/Attribute.h>
#include "../common/AxisUtils.h"
-map<int, SoapKeywordStruct> SoapKeywordMapping::m_Map;
+//map<int, SoapKeywordStruct> SoapKeywordMapping::m_Map;
+SoapKeywordStruct SoapKeywordMapping::m_Map[VERSION_LAST];
volatile bool SoapKeywordMapping::m_bInit = false;
#define __TRC(X) AxisUtils::ToAxisXMLCh(X)
@@ -72,7 +73,23 @@
}
}
+void SoapKeywordMapping::uninitialize()
+{
+ if (m_bInit)
+ {
+ /* soap 1.1 envelop attributes */
+ delete m_Map[SOAP_VER_1_1].pEnv;
+ delete m_Map[SOAP_VER_1_1].pXsi;
+ delete m_Map[SOAP_VER_1_1].pXsd;
+ delete m_Map[SOAP_VER_1_2].pEnv;
+ delete m_Map[SOAP_VER_1_2].pXsi;
+ delete m_Map[SOAP_VER_1_2].pXsd;
+ m_bInit = false;
+ }
+}
+
const SoapKeywordStruct& SoapKeywordMapping::map(int nVersion)
{
return m_Map[nVersion];
}
+
1.50 +4 -2 ws-axis/c/src/engine/Axis.cpp
Index: Axis.cpp
===================================================================
RCS file: /home/cvs/ws-axis/c/src/engine/Axis.cpp,v
retrieving revision 1.49
retrieving revision 1.50
diff -u -r1.49 -r1.50
--- Axis.cpp 6 May 2004 03:55:19 -0000 1.49
+++ Axis.cpp 10 May 2004 11:16:33 -0000 1.50
@@ -311,11 +311,13 @@
extern "C" int uninitialize_module ()
{
- // XMLPlatformUtils::Terminate();
+#ifdef USE_XERCES_PARSER
+ XMLPlatformUtils::Terminate ();
+#endif
ModuleUnInitialize ();
+ SoapKeywordMapping::uninitialize ();
return AXIS_SUCCESS;
}
-
void Ax_Sleep (int nTime)
{