landmarks/locationlandmarks/dbreg/src/EPos_CPosLmDbRegistry.cpp
branchRCL_3
changeset 16 6fcbaa43369c
parent 0 667063e416a2
--- a/landmarks/locationlandmarks/dbreg/src/EPos_CPosLmDbRegistry.cpp	Mon Mar 15 12:42:19 2010 +0200
+++ b/landmarks/locationlandmarks/dbreg/src/EPos_CPosLmDbRegistry.cpp	Wed Mar 31 22:18:21 2010 +0300
@@ -108,12 +108,10 @@
     User::LeaveIfError(iDb.Create(aFileSession, aFileName));
 
     TDeleteFile* del = new (ELeave) TDeleteFile;
-    CleanupStack::PushL(del);
     del->iFs = &aFileSession;
     del->iFilename.Set(aFileName);
 
     CleanupStack::PushL(TCleanupItem(DeleteFileCleanupItem, del));
-    CleanupClosePushL(iDb);
 
     //Create the database table
     CDbColSet* columns = CDbColSet::NewLC();
@@ -134,9 +132,7 @@
     User::LeaveIfError(iDb.Execute(*sql));
     CleanupStack::PopAndDestroy(sql);
 
-    CleanupStack::Pop(&iDb);
-    CleanupStack::Pop(); //DeleteFileCleanupItem
-    CleanupStack::PopAndDestroy(del);
+    CleanupStack::PopAndDestroy(&del); //DeleteFileCleanupItem
     }
 
 // -----------------------------------------------------------------------------