diff -r 36f374c67aa8 -r 12db4185673b email/imap4mtm/imapsyncmanager/src/cimapfolder.cpp --- a/email/imap4mtm/imapsyncmanager/src/cimapfolder.cpp Tue Jul 06 14:12:40 2010 +0300 +++ b/email/imap4mtm/imapsyncmanager/src/cimapfolder.cpp Wed Aug 18 09:45:25 2010 +0300 @@ -1,4 +1,4 @@ -// Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies). +// Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies). // All rights reserved. // This component and the accompanying materials are made available // under the terms of "Eclipse Public License v1.0" @@ -96,6 +96,12 @@ iMatchingMessageIds.Reset(); iDeletedMessageIds.Reset(); iMissingMessageIds.Reset(); + + if(iCachedEntryData) + { + iCachedEntryData->Close(); + } + delete iSelection; iFolderIndex->Reset(); iMessageFlagInfoArray.Reset(); @@ -1121,9 +1127,12 @@ SetEntryL(aFolder); GetChildrenL(*aChildren); + if(iCachedEntryData) + { + iCachedEntryData->Close(); + } delete iCachedEntryData; iCachedEntryData = NULL; - iCachedEntryData = new(ELeave) RArray(5); // Go through them, checking to see if they're messages and removing ones that aren't