--- a/emailservices/emailcommon/src/CFSMailMessagePart.cpp Tue Jun 29 17:12:28 2010 +0300
+++ b/emailservices/emailcommon/src/CFSMailMessagePart.cpp Fri Jul 02 15:55:16 2010 +0300
@@ -529,16 +529,19 @@
if(plugin != NULL)
{
RPointerArray<CFSMailMessagePart> parts;
- RArray<TFSMailMsgId> partIds;
- plugin->ChildPartsL(GetMailBoxId(),GetFolderId(),GetMessageId(),GetPartId(),parts);
+ CleanupResetAndDestroyPushL( parts );
+ plugin->ChildPartsL(GetMailBoxId(),GetFolderId(),GetMessageId(),GetPartId(),parts);
+ RArray<TFSMailMsgId> partIds;
+ CleanupClosePushL( partIds );
+ partIds.ReserveL( 1 + parts.Count() );
for(TInt i=0;i<parts.Count();i++)
{
- partIds.Append(parts[i]->GetMessageId());
+ partIds.AppendL( parts[i]->GetMessageId() );
}
- partIds.Append(GetPartId());
+ partIds.AppendL( GetPartId() );
plugin->RemovePartContentL(GetMailBoxId(), GetFolderId(), GetMessageId(), partIds);
- parts.ResetAndDestroy();
- partIds.Reset();
+ CleanupStack::PopAndDestroy( &partIds );
+ CleanupStack::PopAndDestroy( &parts );
}
}
@@ -559,12 +562,12 @@
{
// get attachment list
RPointerArray<CFSMailMessagePart> attachments;
- attachments.Reset();
+ CleanupResetAndDestroyPushL( attachments );
DoAttachmentListL(attachments);
// copy attachment part ids
RArray<TFSMailMsgId> ids;
- ids.Reset();
+ CleanupClosePushL( ids );
for(TInt i=0;i<attachments.Count();i++)
{
ids.Append(attachments[i]->GetPartId());
@@ -577,8 +580,8 @@
}
// clean tables
- attachments.ResetAndDestroy();
- ids.Reset();
+ CleanupStack::PopAndDestroy( &ids );
+ CleanupStack::PopAndDestroy( &attachments );
}
}