mtpdataproviders/mtpimagedp/src/cmtpimagedpthumbnailcreator.cpp
changeset 52 866b4af7ffbe
parent 49 c20dd21d1eb4
--- a/mtpdataproviders/mtpimagedp/src/cmtpimagedpthumbnailcreator.cpp	Fri Sep 17 11:40:03 2010 +0800
+++ b/mtpdataproviders/mtpimagedp/src/cmtpimagedpthumbnailcreator.cpp	Tue Sep 28 20:14:08 2010 +0800
@@ -65,20 +65,36 @@
         {
         iThumbMgr->CancelRequest(iCurrentReq);
         }
+    
     delete iData;
+    iData = NULL;
+    	
     delete iImgEnc;
+    iImgEnc = NULL;
+    
 #ifdef MTPTHUMBSCALING
     delete iScaler;
+    iScaler = NULL;
 #endif
+    
     delete iBitmap;  
+    iBitmap = NULL;  
+    
     delete iObjectSource;
+    iObjectSource = NULL;
+    	
     delete iThumbMgr;
+    iThumbMgr = NULL;
+    
     if(iActiveSchedulerWait != NULL && iActiveSchedulerWait->IsStarted())
         {
         *iCreationErr = KErrNotReady;
         iActiveSchedulerWait->AsyncStop();
         }
+    
     delete iActiveSchedulerWait;
+    iActiveSchedulerWait = NULL;
+    
     OstTraceFunctionExit0( CMTPIMAGEDPTHUMBNAILCREATOR_CMTPIMAGEDPTHUMBNAILCREATOR_DES_EXIT );
     }
  
@@ -183,6 +199,7 @@
                         "CMTPImageDpThumbnailCreator::RunL(),EDoNotCreate; iState %d", iState );
                 
                 delete iData;
+                iData = NULL;
                 iData = HBufC8::NewL(1);
                 }