vc调用Webservice取数据碰到的问题??

flyayi2006 2007-11-14 12:43:04
大家好,我在用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出来的那些字串都要释放的。
如果要,该如何释放,请大家帮忙!

...全文
100 回复 打赏 收藏 转发到动态 举报
写回复
用AI写文章
回复
切换为时间正序
请发表友善的回复…
发表回复

18,356

社区成员

发帖
与我相关
我的任务
社区描述
VC/MFC 网络编程
c++c语言开发语言 技术论坛(原bbs)
社区管理员
  • 网络编程
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧