Re: [OpenSIPStack] Memory Leak in Proxy and Full Mode
Brought to you by:
joegenbaclor
|
From: Gustavo C. <cur...@ho...> - 2008-05-30 15:04:35
|
Hi Joegen:
I found that the memory leak is when you create a SIPMessage from other SIPMessage or from a OString and then you delete de message.
In the case of the 200 Ok the message is created in:
ProxySessionManager::OnOrphanedMessage()SIPUserAgent::TransportWrite()SIPStack::EnqueueTransportWriteEvent()
{
SIPMessage * msg = new SIPMessage(message);
The memory leak is because the CSeq header. If i comment :
SIPMessage::SIPMessage(const SIPMessage & msg)SIPMessage & SIPMessage::operator=(const SIPMessage & msg)void SIPMessage::AssignContents(SIPMessage & msg)
{
/*if( m_CSeq != NULL ) msg.m_CSeq = static_cast<CSeq*>(m_CSeq->Clone());*/
}
There is no more memory leak.
I try to replace:
SIPMessage * msg = new SIPMessage(message); ---->
SIPMessage * msg = new SIPMessage(message.AsString());
but the memory leak still exist unless i comment:
void SIPMessage::Finalize()
{
/*if( m_CSeq == NULL )
{
m_CSeq = new CSeq( h );
}*/
}
That's what i found so far.
Gustavo
> Date: Fri, 30 May 2008 11:26:11 +0800> To: cur...@gm...; ope...@li...> Subject: Re: [OpenSIPStack] Memory Leak in Proxy and Full Mode> From: joe...@gm...> > Hi Gustavo,> > Take a look at void ProxySession::OnFinalResponse( SIPMessage & message > ) method. Can you verify if the object created in:> > manager.CreateTuple( m_OriginalInvite, m_RoutedInvite, 10 );> > Actually expires after 10 seconds?> > Putting a breakpoint at ProxySessionTupleManager::Tuple::~Tuple() should > be enough to confirm it.> > Also by any chance, did you accidentally think that this tuple is the > mem leak because it was created after the transaction?> > Joegen> > > Gustavo Curetti wrote:> > Hi Joegen> > > > I found a memory leak when the OpenSBC is configured in Proxy or Full mode. When i send a 200 Ok for example in B2B mode there is no memory leak, but when i send a 200 ok in Proxy or Full mode, some memory is taken and never released. I attach the logs. The OpenSBC (192.168.0.202:5070) is running under Windows.> > > > Thanks for your help> > > > Gustavo> > _________________________________________________________________> > Ingresá ya a MSN Deportes y enterate de las últimas novedades del mundo deportivo.> > http://msn.foxsports.com/fslasc/> > ------------------------------------------------------------------------> >> > -------------------------------------------------------------------------> > This SF.net email is sponsored by: Microsoft> > Defy all challenges. Microsoft(R) Visual Studio 2008.> > http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/> > ------------------------------------------------------------------------> >> > _______________________________________________> > opensipstack-devel mailing list> > ope...@li...> > https://lists.sourceforge.net/lists/listinfo/opensipstack-devel> > > > ------------------------------------------------------------------------> >> > No virus found in this incoming message.> > Checked by AVG. > > Version: 7.5.524 / Virus Database: 269.24.1/1463 - Release Date: 5/23/2008 3:36 PM> > > >
_________________________________________________________________
Descargá ya gratis y viví la experiencia Windows Live.
http://www.descubrewindowslive.com/latam/index.html
|