harvester/common/src/harvesterdata.cpp
changeset 45 a93990e5815e
parent 0 c53acadfccc6
child 63 e538444823de
--- a/harvester/common/src/harvesterdata.cpp	Tue Jul 06 14:44:37 2010 +0300
+++ b/harvester/common/src/harvesterdata.cpp	Wed Aug 18 10:12:07 2010 +0300
@@ -29,7 +29,11 @@
 CHarvesterData::CHarvesterData( const HBufC* aUri )
 	{
 	iUri = aUri;
+	iClientData = NULL;
+	iMdeObject = NULL;
+	iLocationData = NULL;
 	iIsBinary = ETrue;
+	iClientId = KNullUid;
 	}
 
 //==========================================================================
@@ -39,9 +43,13 @@
 CHarvesterData::~CHarvesterData()
 	{
 	delete iUri;
+	iUri = NULL;
 	delete iClientData;
+	iClientData = NULL;
 	delete iMdeObject;
+	iMdeObject = NULL;
 	delete iLocationData;
+	iLocationData = NULL;
 	}
 
 //==========================================================================
@@ -225,6 +233,11 @@
 //
 EXPORT_C void CHarvesterData::SetMdeObject( CMdEObject* aMdeObject )
 	{
+    if( iMdeObject )
+        {
+        delete iMdeObject;
+        iMdeObject = NULL;
+        }
 	iMdeObject = aMdeObject;
 	}