vc调用Webservice取数据碰到的问题??
大家好,我在用VC调用Webservice取数据时,登陆到Webservice成功,
但是发现每次取下来的数据会多重复一次。
比如,
第1次取时候,strTemp= "1234567890\n ";
第2次取时候,strTemp= "1234567890\n1234567890\n ";
第3次取时候,strTemp= "1234567890\n1234567890\n1234567890\n ";
如此情况,不知道为什么,请教大家。
代码如下:
GeyeService *m_myService=new GeyeService;
//Do something
String *user=new String( "admin ");
String *psw=new String( "12345 ");
String *ip=new String( "192.168.0.123 ");
String *userCode= new String( " ");
String *sDeviceTree= new String( " ");
String *strChan= new String( " ");
userCode= m_myService-> UserLoginCheck(user,psw,ip);
sDeviceTree = m_myService-> GetDeviceTree(userCode);
CString sTemp= " ";
sTemp.Format( "\n%s\n ",sDeviceTree);
TRACE(sTemp);
m_myService-> UserLogout(userCode);
我想是不是m_myService和String new出来的那些字串都要释放的。
如果要,该如何释放,请大家帮忙!