axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sam...@apache.org
Subject cvs commit: ws-axis/c/samples/client/interoptests/base InteropBaseClient.cpp
Date Wed, 22 Dec 2004 09:47:27 GMT
samisa      2004/12/22 01:47:27

  Modified:    c/samples/client/interoptests/base InteropBaseClient.cpp
  Log:
  Updated the client code in line with the C++ engine memory allocation changes
  done in 1.4. Now, for returned values of method invocations, we have to use
  delete/delete[] instead of free.
  
  Revision  Changes    Path
  1.30      +11 -11    ws-axis/c/samples/client/interoptests/base/InteropBaseClient.cpp
  
  Index: InteropBaseClient.cpp
  ===================================================================
  RCS file: /home/cvs/ws-axis/c/samples/client/interoptests/base/InteropBaseClient.cpp,v
  retrieving revision 1.29
  retrieving revision 1.30
  diff -u -r1.29 -r1.30
  --- InteropBaseClient.cpp	29 Nov 2004 12:39:30 -0000	1.29
  +++ InteropBaseClient.cpp	22 Dec 2004 09:47:27 -0000	1.30
  @@ -86,7 +86,7 @@
   
           // Clean memory 
           if (echoStringResult)
  -            free(echoStringResult);
  +            delete [] echoStringResult;
   
   	// testing echoStringArray 
   	xsd__string_Array arrstr;
  @@ -104,8 +104,8 @@
   	    printf ("successful\n");
               // Do stuff and clean memory
               for( int i = 0; i < arrstrResult.m_Size; i++ )
  -                free (arrstrResult.m_Array[i]);
  -            free(arrstrResult.m_Array);
  +                delete[] arrstrResult.m_Array[i];
  +            delete [] arrstrResult.m_Array;
           }
   	else
   	    printf ("failed\n");
  @@ -135,7 +135,7 @@
           {
   	    printf ("successful\n");
               // Do stuff and clean memory
  -            free(arrintResult.m_Array);
  +            delete [] arrintResult.m_Array;
   	}
           else
   	    printf ("failed\n");
  @@ -166,7 +166,7 @@
   	    printf ("successful\n");
               // Do stuff & clean memory
               // It is our responsibility to deallocate deserializer allocated memory
  -            free(arrfloatResult.m_Array);
  +            delete [] arrfloatResult.m_Array;
           }
   	else
   	    printf ("failed\n");
  @@ -185,7 +185,7 @@
           {
   	    printf ("successful\n");
               // Do stuff and clean memory
  -            free(stctResult->varString);
  +            delete [] stctResult->varString;
               delete stctResult;
           }
   	else
  @@ -214,7 +214,7 @@
   	    printf ("successful\n");
               // Do stuff and clean memory
               for( int i = 0; i < arrstctResult.m_Size; i++ )
  -               free (arrstctResult.m_Array[i].varString);
  +               delete [] arrstctResult.m_Array[i].varString;
               delete [] arrstctResult.m_Array;
           }
   	else
  @@ -244,7 +244,7 @@
               // Do stuff
   	    printf ("Returned String :\n%s\n", bbResult.__ptr);
               // Clean memory
  -            free(bbResult.__ptr);
  +            delete [] bbResult.__ptr;
   	}
   	else
   	    printf ("failed\n");
  @@ -274,7 +274,7 @@
               // Do stuff
   	    printf ("Returned String :\n%s\n", hbResult.__ptr);
               // Clean memory
  -            free(hbResult.__ptr);
  +            delete [] hbResult.__ptr;
   	}
   	else
   	    printf ("failed\n");
  @@ -290,12 +290,12 @@
   	    printf ("failed\n");
   
   	//testing echo boolean
  -	/*printf ("invoking echoBoolean...\n");
  +	printf ("invoking echoBoolean...\n");
   	if (ws.echoBoolean (true_) == true_)
   	    printf ("successful\n");
   	else
   	    printf ("failed\n");
  -*/
  +/**/
       }
       catch (AxisException & e)
       {
  
  
  

Mime
View raw message