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

flyayi2006 2007-11-14 10:06:16
大家好,我在用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 4 打赏 收藏 转发到动态 举报
写回复
用AI写文章
4 条回复
切换为时间正序
请发表友善的回复…
发表回复
knowledge_Is_Life 2008-04-30
  • 打赏
  • 举报
回复
不会,帮顶
flyayi2006 2007-11-14
  • 打赏
  • 举报
回复
UP,大家说说原因看啊,

12,165

社区成员

发帖
与我相关
我的任务
社区描述
.NET技术 Web Services
社区管理员
  • Web Services社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

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