msg db leaking dbfolderinfo table and row

VERIFIED FIXED

Status

MailNews Core
Database
VERIFIED FIXED
16 years ago
9 years ago

People

(Reporter: Bienvenu, Assigned: Bienvenu)

Tracking

({mlk})

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

891 bytes, patch
(not reading, please use seth@sspitzer.org instead)
: superreview+
Details | Diff | Splinter Review
(Assignee)

Description

16 years ago
there's a mork leak that has a bunch of mork stuff and then some of the
following calls in the stack:

orkinStore::GetTableKind()
nsresult nsDBFolderInfo::InitFromExistingDB()
fix coming up.
(Assignee)

Comment 1

16 years ago
Created attachment 51958 [details] [diff] [review]
proposed fix
(Assignee)

Comment 2

16 years ago
the problem was that in the destructor for nsDBFolderInfo, we were skipping the
release of the table and row because m_mdb was null, and that's because we're
nulling it out in the code that's in the patch. Since this is just a pointer,
not a comptr, the patch works fine.

nsDBFolderInfo::~nsDBFolderInfo()
{
  if (gReleaseObserver) 
  {
    NS_IF_RELEASE(gFolderCharsetObserver);
  }
	if (m_mdb)
	{
		if (m_mdbTable)
			m_mdbTable->CutStrongRef(m_mdb->GetEnv());
		if (m_mdbRow)
			m_mdbRow->CutStrongRef(m_mdb->GetEnv());
		// nsMsgDatabase strictly owns nsDBFolderInfo, so don't ref-count db.
//
	m_mdb->Release();
	}
}
Status: NEW → ASSIGNED
(Assignee)

Updated

16 years ago
Keywords: mlk
Comment on attachment 51958 [details] [diff] [review]
proposed fix

sr=sspitzer
Attachment #51958 - Flags: superreview+

Comment 4

16 years ago
r=naving
(Assignee)

Comment 5

16 years ago
fix checked in.
Status: ASSIGNED → RESOLVED
Last Resolved: 16 years ago
Resolution: --- → FIXED
QA Contact: esther → stephend
I didn't see this with the following operations:

* loading a folder
* dragging a message into a folder
* deleting a message

Verified FIXED using Win2K and Purify (latest opt build with symbols).
Status: RESOLVED → VERIFIED
Product: MailNews → Core
Product: Core → MailNews Core
You need to log in before you can comment on or make changes to this bug.