Re: [reSIProcate] RE: memory leak in timerqueue.cxx ?
This is a real leak. I'll fix it and check in.
On 6/27/05, Justin Matthews <justin.matthews@xxxxxxx> wrote:
> I believe that the memory leak is coming from TransactionState.cxx ~:1078
>
> Could someone please confirm this? A modified version of the code is below
> that appears to have fixed the leak.
>
> Also, should TransactionMessage.hxx have a virtual destructor? Deleting a
> Message object that is the base for a TransactionMessage or any other
> derived type will not have the appropriate derived constructor called.
>
> Thanks,
>
> -Justin
>
> ----
> case Timer::TimerG:
> if (mState == Completed)
> {
> StackLog (<< "TimerG fired. retransmit, and re-add TimerG");
> sendToWire(mMsgToRetransmit, true);
> mController.mTimers.add(Timer::TimerG, mId,
> resipMin(Timer::T2, timer->getDuration()*2) ); // !slg! TimerG is supposed
> to double - up until a max of T2 RFC3261 17.2.1
> }
>
> delete msg;
> msg = 0;
>
> break;
> -----
>
> -----Original Message-----
> From: Justin Matthews [mailto:justin.matthews@xxxxxxx]
> Sent: Saturday, June 25, 2005 1:17 PM
> To: 'resiprocate-devel@xxxxxxxxxxxxxxxxxxx'
> Subject: RE: memory leak in timerqueue.cxx ?
>
> After looking at the code I realized that the mFifo is a reference to a fifo
> in the TransactionController and is in use.
>
> I was unable to find the location of the leak, but the scenario I described
> below should reproduce the problem. Please let me know if you need any
> additional details about the scenario.
>
> Thanks,
>
> -Justin
>
> -----Original Message-----
> From: Justin Matthews [mailto:justin.matthews@xxxxxxx]
> Sent: Saturday, June 25, 2005 9:13 AM
> To: 'resiprocate-devel@xxxxxxxxxxxxxxxxxxx'
> Subject: memory leak in timerqueue.cxx ?
>
> Hello,
>
> My debug tools are showing a memory leak in timerqueue.cxx:152
>
> "mFifo.add(new TimerMessage(i->mTransactionId, i->mType, i->mDuration));"
>
> mFifo does not appear to be used anywhere else in the code so objects are
> never used from this fifo, from what I can see anyway.
>
> The full call stack is:
>
> Resip::TimerQueue::process line 152
> Resip::TransactionController::process line 81
> Resip::SipStack::process line 420
>
> Also, the scenario I was running used DUM and rejected all incoming INVITE's
> with a 480 using ServerInvitesession::reject(480).
>
>
> Thanks,
>
> -Justin
>
> _______________________________________________
> resiprocate-devel mailing list
> resiprocate-devel@xxxxxxxxxxxxxxxxxxx
> https://list.sipfoundry.org/mailman/listinfo/resiprocate-devel
>