Closed Bug 388346 Opened 17 years ago Closed 17 years ago

nsMoveCoalescerCopyListener leaks on filter copy operations

Categories

(MailNews Core :: Networking: IMAP, defect)

x86
Windows Vista
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: mscott, Assigned: mscott)

Details

(Keywords: memory-leak)

Attachments

(1 file)

Trunk build.

Start up Thunderbird w/ it configured to check for new mail. Make sure you have a filter that moves a new incoming message into another imap folder.

Quit the app.

We leak the nsMoveCoalescerCopyListener used for the copy operation. This in turn leaks the destination mail folder.

I think it's leaking because it owns a reference to itself and I don't see that reference being removed anywhere.

http://mxr.mozilla.org/seamonkey/source/mailnews/base/util/nsImapMoveCoalescer.cpp#188
Attached patch possible fixSplinter Review
I'm sure this will break somewhere else, but for the simple case I'm seeing where a filter is copying a message to another imap folder, this fixes the leak. 

nsImapMailCopyState holds a strong reference to the nsImapMoveCoalescerListener object which lasts for the lifetime of the copy operation.
I'll run with this and see what happens.
Comment on attachment 272549 [details] [diff] [review]
possible fix

I've been running this in my build all week without any ill effects yet...
Attachment #272549 - Flags: superreview?(bienvenu)
Attachment #272549 - Flags: superreview?(bienvenu) → superreview+
Status: NEW → RESOLVED
Closed: 17 years ago
Resolution: --- → FIXED
Keywords: mlk
Product: Core → MailNews Core
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: