欢迎来到Doc100.Net免费学习资源知识分享平台!
您的位置:首页 > 程序异常 >

程序已封闭,user 42

更新时间: 2014-01-05 02:40:26 责任编辑: Author_N1

 

程序已关闭,user 42.
程序编译无问题,出现上述错误,得知是指针被重复删除,可我检查了半天,不知哪一句出的问题,求高手告知
{
TBuf<20> number(_L(""));
TBuf<128> callNameBuf;
TBuf<20> firstname(_L(""));
CAknTextQueryDialog* dialog=CAknTextQueryDialog::NewL(number);//声明登陆对话框对象
if (dialog->ExecuteLD(R_LICH_KING_CONTAINER_DATA_QUERY2))
{
   CPbkContactEngine* iContactsDb = CPbkContactEngine::NewL();
   CleanupStack::PushL(iContactsDb);
   CContactIdArray* iMyIdArray = iContactsDb->MatchPhoneNumberL(number, 15);
   CleanupStack::PushL(iMyIdArray);
   callNameBuf.AppendNum(iMyIdArray->Count());
                                                                                     CEikonEnv::InfoWinL(_L("Count of Matches"),callNameBuf);
for (TInt i = 0; i < iMyIdArray->Count(); i++)
     {
          TContactItemId id = (*iMyIdArray)[i];
                                                         
          CPbkContactItem* contact = iContactsDb->ReadContactL(id);
          CleanupStack::PushL(contact);//2
          CAknTextQueryDialog* dialog=CAknTextQueryDialog::NewL(firstname);//声明登陆对话框对象

            if (dialog->ExecuteLD(R_LICH_KING_CONTAINER_DATA_QUERY3))
                 {
                     TPbkContactItemField* field = contact->FindField(EPbkFieldIdFirstName);
                     CleanupStack::PushL(field);//1
                     field->TextStorage()->SetTextL(firstname);
                     iContactsDb->CommitContactL(*contact);
                     CleanupStack::PopAndDestroy(field);
                                                      
                  }
             CleanupStack::PopAndDestroy(contact);
              }
上一篇:上一篇
下一篇:下一篇

 

随机推荐程序问答结果

 

 

如对文章有任何疑问请提交到问题反馈,或者您对内容不满意,请您反馈给我们DOC100.NET论坛发贴求解。
DOC100.NET资源网,机器学习分类整理更新日期::2014-01-05 02:40:26
如需转载,请注明文章出处和来源网址:http://www.doc100.net/bugs/t/12955/
本文WWW.DOC100.NET DOC100.NET版权所有。