You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by sa...@apache.org on 2005/01/25 08:05:51 UTC

cvs commit: ws-axis/c/src/soap/xsd Int.cpp

samisa      2005/01/24 23:05:51

  Modified:    c/src/soap/xsd Int.cpp
  Log:
  Fixed few memory leaks
  
  Revision  Changes    Path
  1.8       +13 -5     ws-axis/c/src/soap/xsd/Int.cpp
  
  Index: Int.cpp
  ===================================================================
  RCS file: /home/cvs/ws-axis/c/src/soap/xsd/Int.cpp,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- Int.cpp	24 Jan 2005 17:21:26 -0000	1.7
  +++ Int.cpp	25 Jan 2005 07:05:51 -0000	1.8
  @@ -48,7 +48,9 @@
     LONGLONG* minInclusive = new LONGLONG;
     *minInclusive = strtol ("-2147483648", &end, 10);
       
  -    return new MinInclusive(*minInclusive);
  +    MinInclusive* retVal = new MinInclusive(*minInclusive);
  +    delete minInclusive;
  +    return retVal;
   }
   
   MinExclusive* Int::getMinExclusive()
  @@ -56,8 +58,10 @@
     AxisChar* end;    
     LONGLONG* minExclusive = new LONGLONG;
     *minExclusive = strtol ("-2147483649", &end, 10);
  -    
  -    return new MinExclusive(*minExclusive);
  +
  +    MinExclusive* retVal = new MinExclusive(*minExclusive);
  +    delete minExclusive;
  +    return retVal;
   }
   
   MaxInclusive* Int::getMaxInclusive()
  @@ -66,7 +70,9 @@
     LONGLONG* maxInclusive = new LONGLONG;
     *maxInclusive = strtol ("2147483647", &end, 10);
       
  -    return new MaxInclusive(*maxInclusive);
  +    MaxInclusive* retVal = new MaxInclusive(*maxInclusive);
  +    delete maxInclusive;
  +    return retVal;
   }
   
   MaxExclusive* Int::getMaxExclusive()
  @@ -75,7 +81,9 @@
     LONGLONG* maxExclusive = new LONGLONG;
     *maxExclusive = strtol ("2147483648", &end, 10);
       
  -    return new MaxExclusive(*maxExclusive);
  +    MaxExclusive* retVal = new MaxExclusive(*maxExclusive);
  +    delete maxExclusive;
  +    return retVal;
   }
   
   AXIS_CPP_NAMESPACE_END