[reSIProcate] DUM Dialog.cxx Erro Code

fancy_xiao fancy_xiao at astrocom.cn
Tue Feb 6 03:32:28 CST 2007


Hello

     I think C++ don't have that exception to throw!

------------------				 
fancy_xiao
2007-02-06

-------------------------------------------------------------
发件人:maodonghu
发送日期:2007-02-06 17:16:12
收件人:fancy_xiao
抄送:resip
主题:Re: [reSIProcate] DUM Dialog.cxx Erro Code

Hi, fancy_xiao

 I think It will throw exception if delete same pointer twice.



> Hello:
>
>Dialog::~Dialog()
>{
>   DebugLog ( <<"Dialog::~Dialog() ");
>
>   mDestroying = true;
>
>   while (!mClientSubscriptions.empty())
>   {
>      delete *mClientSubscriptions.begin();
>   }
>   while (!mServerSubscriptions.empty())
>   {
>      delete *mServerSubscriptions.begin();
>   }
>
>   delete mInviteSession;
>   mDialogSet.mDialogs.erase(this->getId());
>   delete mAppDialog;
>   if(!mReUseDialogSet)
>   {
>      mDialogSet.possiblyDie();
>   }      
>}
>
>in this function;
>
>   while (!mClientSubscriptions.empty())
>   {
>      delete *mClientSubscriptions.begin();
>   }
>   while (!mServerSubscriptions.empty())
>   {
>      delete *mServerSubscriptions.begin();
>   }
>
>must change to :
>   while (!mClientSubscriptions.empty())
>   {
>      delete *mClientSubscriptions.begin();
>	  mClientSubscriptions.pop_front();
>   }
>   while (!mServerSubscriptions.empty())
>   {
>      delete *mServerSubscriptions.begin();
>      mServerSubscriptions.pop_front();
>   }
>
>otherwise it should be a dead loop!
> 				
>--------------
>fancy_xiao
>2007-02-06
>
>_______________________________________________
>resiprocate-devel mailing list
>resiprocate-devel at list.resiprocate.org
>https://list.resiprocate.org/mailman/listinfo/resiprocate-devel
>


				 
        maodonghu
        hhmmdd at tom.com
          2007-02-06





More information about the resiprocate-devel mailing list