--- a/textinput/ptienginev2/src/PtiSymbolList.cpp Tue Aug 31 15:31:50 2010 +0300
+++ b/textinput/ptienginev2/src/PtiSymbolList.cpp Wed Sep 01 12:23:33 2010 +0100
@@ -181,7 +181,7 @@
}
void CSymbolList::GetSymbolModelL(const TDesC& aChar, RArray<TPoint>& aModel ,TUint& aUnicode, const THwrUdmRange& aRange )
- {
+ {CleanupClosePushL( aModel );
TInt idx = -1;
if ( GetSymbolIndex( aChar, idx, aRange ) != KErrNone )
{
@@ -203,7 +203,8 @@
for ( int i = 0; i < symbol->iPointVectorLen; i++ )
{
aModel.AppendL( symbol->iPointVector[i] );
- }
+ }
+ CleanupStack::Pop( &aModel );
}
void CSymbolList::DeleteSymbolModelL(const TDesC& aChar ,const THwrUdmRange& aRange )
@@ -291,7 +292,8 @@
}
void CSymbolList::GetModelIndexListL( RArray<TInt>& aList, const THwrUdmRange& aRange)
- {
+ {CleanupClosePushL( aList );
+
aList.Reset();
for ( int i = 0; i < iSymbolList.Count(); i++ )
{
@@ -313,6 +315,7 @@
}
}
}
+ CleanupStack::Pop( &aList );
}
void CSymbolList::InternalizeL(const TDesC& /*aFile*/)
@@ -530,19 +533,20 @@
}
void CSymbolList::GetAllPresetSymbolsL( RArray<TUint>& aPresets )
- {
+ {CleanupClosePushL( aPresets );
User::LeaveIfNull( iPresetModels );
for ( int i = 0; i < iPresetModels->iSymbolList.Count(); i ++ )
{
aPresets.AppendL( iPresetModels->iSymbolList[i]->iPresetCode );
}
+ CleanupStack::Pop( &aPresets );
}
void CSymbolList::GetPresetSymbolByUnicodeL( TUint aUnicode, RArray<TPoint>& aModel, TDes& aShortcut )
{
- User::LeaveIfNull( iPresetModels );
-
+ CleanupClosePushL( aModel );
+ User::LeaveIfNull( iPresetModels );
for ( int i = 0; i < iPresetModels->iSymbolList.Count(); i ++ )
{
CSymbol* sym = iPresetModels->iSymbolList[i];
@@ -557,11 +561,13 @@
for ( int i = 0; i < sym->iPointVectorLen; i++ )
{
aModel.AppendL( sym->iPointVector[i] );
- }
+ }
+ CleanupStack::Pop( &aModel );
return;
}
}
- User::Leave( KErrNotFound );
+ CleanupStack::Pop( &aModel );
+ User::Leave( KErrNotFound );
}
void CSymbolList::SignalMutex(TAny* aMutex)