Closed
Bug 499446
Opened 15 years ago
Closed 15 years ago
Bug 497680 cause reported memory leaks in xpcshell-tests (bayesian-spam-filter and test_bug366491.js)
Categories
(MailNews Core :: Backend, defect)
MailNews Core
Backend
Tracking
(Not tracked)
RESOLVED
FIXED
Thunderbird 3.0b3
People
(Reporter: standard8, Assigned: Bienvenu)
References
Details
(Keywords: memory-leak, regression)
Attachments
(1 file)
976 bytes,
patch
|
standard8
:
review+
standard8
:
superreview+
|
Details | Diff | Splinter Review |
The landing of bug 497680 caused reported leaks in all the extensions/bayesian-spam-filter tests and test_bug366491.js (mailnews/base/test/unit). This is possibly similar to our other rdf resource leak bugs, e.g. bug 498323 or bug 498321), however reporting it here as it is a fresh reported leak.
Flags: wanted-thunderbird3+
Assignee | ||
Comment 1•15 years ago
|
||
I'll look at this.
Assignee: nobody → bienvenu
Status: NEW → ASSIGNED
Assignee | ||
Comment 2•15 years ago
|
||
it looks like a few of the local folder special folders are leaking, e.g., Trash, Unsent Messages...probably a ref-counting problem...
Assignee | ||
Comment 3•15 years ago
|
||
fixes ref counting problem in GetAllFolders. The closer we get to 0 leaks, the easier it is to find leak regressions :-)
Attachment #384265 -
Flags: superreview?(bugzilla)
Attachment #384265 -
Flags: review?(bugzilla)
Assignee | ||
Updated•15 years ago
|
Whiteboard: [has patch for review, standard8]
Reporter | ||
Updated•15 years ago
|
Attachment #384265 -
Flags: superreview?(bugzilla)
Attachment #384265 -
Flags: superreview+
Attachment #384265 -
Flags: review?(bugzilla)
Attachment #384265 -
Flags: review+
Reporter | ||
Comment 4•15 years ago
|
||
Comment on attachment 384265 [details] [diff] [review] proposed fix > for (i = 0; i < folderCount; i++) >- folderArray->AppendElement(allDescendents->ElementAt(i), PR_FALSE); >+ { >+ nsCOMPtr<nsIMsgFolder> folder(do_QueryElementAt(allDescendents, i)); >+ folderArray->AppendElement(folder, PR_FALSE); >+ } I think moving the nsCOMPtr outside the loop is meant to be a bit more efficient. Alternately we could just drop the nsCOMPtr and append the result of do_QueryElementAt, as the change to do_QueryElementAt is what is fixing the leak here. r/sr=Standard8 either way.
Assignee | ||
Comment 5•15 years ago
|
||
do_QueryElementAt by itself doesn't compile - perhaps some sort of casting would have helped, but I just moved the comptr outside the loop. Fix checked in.
Status: ASSIGNED → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
Updated•15 years ago
|
Whiteboard: [has patch for review, standard8]
Target Milestone: --- → Thunderbird 3.0b3
Reporter | ||
Updated•15 years ago
|
Flags: in-testsuite+
You need to log in
before you can comment on or make changes to this bug.
Description
•