nsMoveCoalescerCopyListener leaks on filter copy operations

RESOLVED FIXED

Status

RESOLVED FIXED
12 years ago
10 years ago

People

(Reporter: mscott, Assigned: mscott)

Tracking

({memory-leak})

Trunk
x86
Windows Vista
memory-leak

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Assignee)

Description

12 years ago
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
(Assignee)

Comment 1

12 years ago
Created attachment 272549 [details] [diff] [review]
possible fix

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.

Comment 2

12 years ago
I'll run with this and see what happens.
(Assignee)

Comment 3

12 years ago
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)

Updated

12 years ago
Attachment #272549 - Flags: superreview?(bienvenu) → superreview+
(Assignee)

Updated

12 years ago
Status: NEW → RESOLVED
Last Resolved: 12 years ago
Resolution: --- → FIXED

Updated

11 years ago
Keywords: mlk
Product: Core → MailNews Core
You need to log in before you can comment on or make changes to this bug.