diff -r 0295359a7673 -r 69df6ed78a6a realtimenetprots/sipfw/ProfileAgent/AlrMonitor/src/sipalrmonitor.cpp --- a/realtimenetprots/sipfw/ProfileAgent/AlrMonitor/src/sipalrmonitor.cpp Fri Aug 06 15:14:04 2010 +0300 +++ b/realtimenetprots/sipfw/ProfileAgent/AlrMonitor/src/sipalrmonitor.cpp Mon Aug 23 17:50:26 2010 +0300 @@ -188,16 +188,20 @@ // void CSipAlrMonitor::FreeResources ( MSipAlrObserver& aObserver ) { + CSipAlrSnapMonitor* monitor= 0; for ( TInt i = iSnapMonitors.Count()-1; i >= 0; i-- ) { TBool last = iSnapMonitors[i]->DetachObserver ( aObserver ); if ( last ) { - delete iSnapMonitors[i]; - iSnapMonitors.Remove ( i ); + monitor = iSnapMonitors[i]; + iSnapMonitors.Remove(i); + delete monitor; + monitor = NULL; PROFILE_DEBUG1( "CSipAlrMonitor::FreeResources monitor deleted" ) } } + iSnapMonitors.Compress(); } // -----------------------------------------------------------------------------