--- a/locationmanager/locationtrail/src/cgpxconverterao.cpp Fri Mar 19 09:38:01 2010 +0200
+++ b/locationmanager/locationtrail/src/cgpxconverterao.cpp Fri Apr 16 15:23:55 2010 +0300
@@ -70,6 +70,12 @@
iObservers.Reset();
+ iFileQueue.ResetAndDestroy();
+ iFileQueue.Close();
+
+ iBoundQueue.ResetAndDestroy();
+ iBoundQueue.Close();
+
delete iWriteBuf;
delete iFormatBuf;
}
@@ -105,8 +111,10 @@
{
LOG("CGpxConverterAO::AddToQueueL");
TFileName *filename = new (ELeave) TFileName(aFileName);
- iFileQueue.Append(filename);
- iBoundQueue.Append( aBoundaries );
+ CleanupStack::PushL( filename );
+ iFileQueue.AppendL( filename );
+ CleanupStack::Pop( filename );
+ iBoundQueue.AppendL( aBoundaries );
if ( iState == EIdle )
{
@@ -275,8 +283,7 @@
distance = iBoundaries->distance;
}
- TInt count = iObservers.Count();
- for( TInt i = 0; i < count; i++ )
+ for( TInt i = iObservers.Count() - 1; i >=0; i-- )
{
iObservers[i]->GpxFileCreated( iGpxPath, iTagId, distance, iStartTime, iEndTime );
}