uifw/AvKon/src/AknLayoutConfig.cpp
branchRCL_3
changeset 9 0aa5fbdfbc30
parent 0 2f259fa3e83a
child 19 aecbbf00d063
--- a/uifw/AvKon/src/AknLayoutConfig.cpp	Wed Apr 14 16:14:00 2010 +0300
+++ b/uifw/AvKon/src/AknLayoutConfig.cpp	Tue Apr 27 16:55:05 2010 +0300
@@ -341,6 +341,8 @@
 												RArray<SAknScreenModeInfo>& aScreenInfoArray, 
 											    RArray<SHardwareStateInfo>& aHardwareStateArray)
 	{
+    ::CleanupClosePushL(aScreenInfoArray);
+    ::CleanupClosePushL(aHardwareStateArray);
 	// get state screen map
 #if defined(__WINS__)
     TInt screenMapResource = R_AKNPRIV_HARDWARE_STATE_SCREEN_MAP_EMUL;
@@ -387,11 +389,14 @@
 		}
 
 	CleanupStack::PopAndDestroy(); // reader's HBufC
+	CleanupStack::Pop(&aHardwareStateArray);
+	CleanupStack::Pop(&aScreenInfoArray);
 	}
 	
 void CAknLayoutConfig::GetKeyMapFromAknPrivL(CResourceFile* aResFile,
 											 RArray<SHardwareStateInfo>& aHardwareStateArray)
 	{
+    ::CleanupClosePushL(aHardwareStateArray);
 	// get the state key map
 #if defined(__WINS__)
     TInt hwMapResource = R_AKNPRIV_HARDWARE_STATE_KEY_MAP_EMUL;
@@ -416,6 +421,7 @@
         }
 
     CleanupStack::PopAndDestroy(); // reader's HBufC
+    CleanupStack::Pop(&aHardwareStateArray);
 	}
 
 TAknPrivSoftkeyLocation CAknLayoutConfig::GetLandscapeSoftkeyLocationFromAknPrivL(CResourceFile* aResFile)
@@ -444,6 +450,7 @@
 												RArray<SAknScreenModeInfo>& aScreenInfoArray, 
 												TAknPrivSoftkeyLocation aLandscapeSoftkeyLocation)
 	{
+	::CleanupClosePushL(aScreenInfoArray);
 	CEikonEnv* eikonEnv = CEikonEnv::Static();
 	CWsScreenDevice* dev = eikonEnv->ScreenDevice();
 
@@ -475,6 +482,7 @@
     	screenMode.iDisplayMode = dev->GetScreenModeDisplayMode(ii);
 		aScreenInfoArray.AppendL(screenMode);
 		}
+	CleanupStack::Pop(&aScreenInfoArray);
 	}
 
 //