Address book import leaks due to incorrect reference counting of proxy pointers

RESOLVED FIXED in Thunderbird 3.0b3

Status

MailNews Core
Import
RESOLVED FIXED
9 years ago
9 years ago

People

(Reporter: standard8, Assigned: standard8)

Tracking

({memory-leak})

Trunk
Thunderbird 3.0b3
memory-leak

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Assignee)

Description

9 years ago
Created attachment 375004 [details] [diff] [review]
The fix

When we do an address book import, we're leaking various classes as we're not ref counting our pointers correctly.

I realised this when looking at the leaks on test_ldif_import.js with the latest patch from bug 438922 applied.

Patch attached to fix this - it switches to using nsCOMPtr on the proxy objects (as we do everywhere else), changes the function to return type already_AddRefed (which the result is), and stops the nsAbLDIFService keeping a pointer to the database - it doesn't need to as it only needs it for the life of the import.
Attachment #375004 - Flags: superreview?(bienvenu)
Attachment #375004 - Flags: review?(bienvenu)

Updated

9 years ago
Attachment #375004 - Flags: superreview?(bienvenu)
Attachment #375004 - Flags: superreview+
Attachment #375004 - Flags: review?(bienvenu)
Attachment #375004 - Flags: review+
(Assignee)

Comment 1

9 years ago
Checked in: http://hg.mozilla.org/comm-central/rev/8e72da555191
Status: NEW → RESOLVED
Last Resolved: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → Thunderbird 3.0b3
You need to log in before you can comment on or make changes to this bug.