nsMsgDatabase leaks an nsMdbFactory on shutdown

RESOLVED DUPLICATE of bug 388101

Status

RESOLVED DUPLICATE of bug 388101
12 years ago
10 years ago

People

(Reporter: ispiked, Assigned: ispiked)

Tracking

({memory-leak})

1.8 Branch
memory-leak

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Assignee)

Description

12 years ago
Found using the trace refcount logs.

gMDBFactory is declared here but never released in the descrutor: http://bonsai.mozilla.org/cvsblame.cgi?file=/mozilla/mailnews/db/msgdb/src/nsMsgDatabase.cpp&rev=1.367&mark=991#987.

nsMsgFolderCache gets around this by declaring the variable right above the destructor and then releasing it in the descructor: http://bonsai.mozilla.org/cvsblame.cgi?file=/mozilla/mailnews/base/src/nsMsgFolderCache.cpp&rev=1.48&mark=63,72-75#61.

We can do this in nsMsgDatabase, but it just feels weird since it's such a big file...
(Assignee)

Comment 1

12 years ago
Created attachment 232469 [details] [diff] [review]
hack
(Assignee)

Comment 2

12 years ago
nsAddrDatabase needs to be fixed, too.
(Assignee)

Comment 3

12 years ago
What do you think, David? Is declaring the variable above the destructor like this acceptable, or does it need to become a member variable somehow?
(Assignee)

Comment 4

12 years ago
Can someone explain to me why GetMDBFactory is even a static method?
This has been fixed by bug 388101. Marking as duplicate.
Status: NEW → RESOLVED
Last Resolved: 11 years ago
Resolution: --- → DUPLICATE
Duplicate of bug: 388101
Product: Core → MailNews Core
You need to log in before you can comment on or make changes to this bug.