Closed Bug 347678 Opened 18 years ago Closed 17 years ago

nsMsgDatabase leaks an nsMdbFactory on shutdown

Categories

(MailNews Core :: Database, defect)

1.8 Branch
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED DUPLICATE of bug 388101

People

(Reporter: ispiked, Assigned: ispiked)

Details

(Keywords: memory-leak)

Attachments

(1 file)

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...
Attached patch hackSplinter Review
nsAddrDatabase needs to be fixed, too.
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?
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
Closed: 17 years ago
Resolution: --- → DUPLICATE
Product: Core → MailNews Core
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: