From e8c04d9530a30db4a9dafb2714888513f18fe13f Mon Sep 17 00:00:00 2001 From: "jefft%netscape.com" Date: Thu, 1 Jul 1999 18:30:52 +0000 Subject: [PATCH] fixed memory leak using nsISupportsArray --- mailnews/base/src/nsMsgCopyService.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/mailnews/base/src/nsMsgCopyService.cpp b/mailnews/base/src/nsMsgCopyService.cpp index 1868fb4d4ec..440313bbb16 100644 --- a/mailnews/base/src/nsMsgCopyService.cpp +++ b/mailnews/base/src/nsMsgCopyService.cpp @@ -384,7 +384,10 @@ nsMsgCopyService::CopyMessages(nsIMsgFolder* srcFolder, /* UI src foler */ // duplicate the message array so we could sort the messages by it's // folder easily for (i=0; iAppendElement(messages->ElementAt(i)); + { + aSupport = getter_AddRefs(messages->ElementAt(i)); + msgArray->AppendElement(aSupport); + } rv = msgArray->Count(&rv); if (NS_FAILED(rv)) goto done;