Closed
Bug 175540
Opened 22 years ago
Closed 22 years ago
[FIX]Mailnews use of arrays cleanup, part 1
Categories
(MailNews Core :: Backend, defect, P1)
MailNews Core
Backend
Tracking
(Not tracked)
RESOLVED
FIXED
mozilla1.3alpha
People
(Reporter: bzbarsky, Assigned: bzbarsky)
Details
(Keywords: memory-leak)
Attachments
(2 files, 3 obsolete files)
97.76 KB,
patch
|
dmosedale
:
review+
alecf
:
superreview+
|
Details | Diff | Splinter Review |
82.66 KB,
patch
|
Details | Diff | Splinter Review |
This patch does a few things: 1) Replaces most uses of nsISupportsArray::ElementAt with QueryElementAt, since the code just QIed the nsISupports to something else immediately 2) Replaces some uses of nsISupportsArray with nsCOMArray where this made sense 3) Fixes a few leaks It doesn't eliminate all calls to ElementAt in mailnews, but it leaves a lot fewer of them....
Assignee | ||
Comment 1•22 years ago
|
||
Assignee | ||
Comment 2•22 years ago
|
||
Assignee | ||
Comment 3•22 years ago
|
||
Oh, and is the "readonly attribute nsISupportsArray msgWindowsArray;" on nsIMsgMailSession actually useful? It's certainly not used.... and if if did not exist, mWindows could become an nsCOMArray easily as well (it still could; would just make the attr getter slower).
Keywords: mlk
Priority: -- → P1
Summary: Mailnews use of arrays cleanup, part 1 → [FIX]Mailnews use of arrays cleanup, part 1
Target Milestone: --- → mozilla1.3alpha
Assignee | ||
Comment 4•22 years ago
|
||
some stuff snuck in the first one that should not have.
Attachment #103472 -
Attachment is obsolete: true
Comment 5•22 years ago
|
||
Dan, when you get a chance, can you verify this bug?
QA Contact: gayatri → dmose
Assignee | ||
Comment 6•22 years ago
|
||
For that matter, Dan, could you review? ;)
Assignee | ||
Comment 7•22 years ago
|
||
Attachment #103471 -
Attachment is obsolete: true
Assignee | ||
Comment 8•22 years ago
|
||
Attachment #103693 -
Attachment is obsolete: true
Assignee | ||
Updated•22 years ago
|
Attachment #105700 -
Flags: superreview?(alecf)
Attachment #105700 -
Flags: review?(dmose)
Comment 9•22 years ago
|
||
Comment on attachment 105700 [details] [diff] [review] update to tip as far as the NS_ASSERTION when you're about to leak, lets just add the extra "break;" to that if() statement - its the right thing to do, even if it doesn't necessarily leak - might as well exit the loop early, eh? I'm trying to think of a nicer way to do an array of nsCOMArrays, but one isn't occuring to me. sr=alecf with the break; added. Nice work, there is a lot of code cleanup here.
Attachment #105700 -
Flags: superreview?(alecf) → superreview+
Assignee | ||
Comment 10•22 years ago
|
||
Adding the break; would change the behavior significantly -- we would be getting the first match instead of the last match. I'm not willing to make that change without a much deeper knowledge of this code... I can spin off a separate bug on that particular chunk of code if you want.
Comment 11•22 years ago
|
||
Comment on attachment 105700 [details] [diff] [review] update to tip file a bug about the leak, and you've got r=dmose
Attachment #105700 -
Flags: review?(dmose) → review+
Assignee | ||
Comment 12•22 years ago
|
||
Bug 181212 filed. Checked in, except for this change to mailnews/base/src/nsMsgFolderCache.cpp: - *result = (nsIMsgFolderCacheElement *) m_cacheElements->Get(&hashKey); + *result = (nsIMsgFolderCacheElement *) m_cacheElements->Get(&hashKey).get(); that part was not supposed to sneak in. It didn't build anyway, in a clean tree, so.. ;)
Status: NEW → RESOLVED
Closed: 22 years ago
Resolution: --- → FIXED
Updated•20 years ago
|
Product: MailNews → Core
Updated•16 years ago
|
Product: Core → MailNews Core
You need to log in
before you can comment on or make changes to this bug.
Description
•