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 sa...@apache.org on 2005/01/21 04:05:41 UTC
cvs commit: ws-axis/c/src/soap/xsd/constraints WhiteSpace.cpp WhiteSpace.hpp
samisa 2005/01/20 19:05:41
Modified: c/src/soap/xsd/constraints WhiteSpace.cpp WhiteSpace.hpp
Log:
Fixed some memory leaks.
Revision Changes Path
1.2 +5 -1 ws-axis/c/src/soap/xsd/constraints/WhiteSpace.cpp
Index: WhiteSpace.cpp
===================================================================
RCS file: /home/cvs/ws-axis/c/src/soap/xsd/constraints/WhiteSpace.cpp,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- WhiteSpace.cpp 20 Jan 2005 09:51:27 -0000 1.1
+++ WhiteSpace.cpp 21 Jan 2005 03:05:41 -0000 1.2
@@ -7,6 +7,11 @@
m_isSet = true;
}
+ WhiteSpace::~WhiteSpace()
+ {
+ delete [] m_Buf;
+ }
+
WhiteSpace::WhiteSpace(whiteSpaceValue whiteSpace):m_Buf(NULL)
{
m_isSet = true;
@@ -41,7 +46,6 @@
}
m_Buf = new char[strlen (returnValue) + 1];
strcpy (m_Buf, returnValue);
- delete returnValue;
return m_Buf;
}
1.2 +2 -0 ws-axis/c/src/soap/xsd/constraints/WhiteSpace.hpp
Index: WhiteSpace.hpp
===================================================================
RCS file: /home/cvs/ws-axis/c/src/soap/xsd/constraints/WhiteSpace.hpp,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- WhiteSpace.hpp 20 Jan 2005 09:51:27 -0000 1.1
+++ WhiteSpace.hpp 21 Jan 2005 03:05:41 -0000 1.2
@@ -47,6 +47,8 @@
WhiteSpace();
+ ~WhiteSpace();
+
WhiteSpace(whiteSpaceValue whiteSpace);
bool isSet();