emailservices/emailcommon/src/CFSMailMessageBase.cpp
changeset 74 6c59112cfd31
parent 62 a8c646b56683
--- a/emailservices/emailcommon/src/CFSMailMessageBase.cpp	Wed Sep 15 17:47:19 2010 +0300
+++ b/emailservices/emailcommon/src/CFSMailMessageBase.cpp	Thu Sep 30 11:43:07 2010 +0300
@@ -288,6 +288,8 @@
     if (aRecipient) 
         {
         iNmPrivateMessageEnvelope->mToRecipients.append(aRecipient->GetNmAddress());
+        delete aRecipient;//ownership transferred to us so we can delete.
+        aRecipient = NULL;
         }
 // </qmail>
 }
@@ -304,6 +306,8 @@
         {
         iNmPrivateMessageEnvelope->mCcRecipients.append(
             aRecipient->GetNmAddress());
+        delete aRecipient;//ownership transferred to us so we can delete.
+        aRecipient = NULL;
         }
 // </qmail>
 }
@@ -320,6 +324,8 @@
         {
         iNmPrivateMessageEnvelope->mBccRecipients.append(
             aRecipient->GetNmAddress());
+        delete aRecipient;//ownership transferred to us so we can delete.
+        aRecipient = NULL;
         }
 // </qmail>      
 }