зеркало из https://github.com/mozilla/gecko-dev.git
fix memory leaks and mismatched deletes
This commit is contained in:
Родитель
eba8d9c336
Коммит
f82367de5f
|
@ -30,7 +30,8 @@ nsMsgFolderCacheElement::nsMsgFolderCacheElement()
|
|||
nsMsgFolderCacheElement::~nsMsgFolderCacheElement()
|
||||
{
|
||||
NS_IF_RELEASE(m_mdbRow);
|
||||
NS_IF_RELEASE(m_owningCache);
|
||||
// circular reference, don't do it.
|
||||
// NS_IF_RELEASE(m_owningCache);
|
||||
PR_FREEIF(m_folderURI);
|
||||
}
|
||||
|
||||
|
@ -43,8 +44,9 @@ NS_IMPL_SETTER_STR(nsMsgFolderCacheElement::SetURI, m_folderURI)
|
|||
void nsMsgFolderCacheElement::SetOwningCache(nsMsgFolderCache *owningCache)
|
||||
{
|
||||
m_owningCache = owningCache;
|
||||
if (owningCache)
|
||||
NS_ADDREF(owningCache);
|
||||
// circular reference, don't do it.
|
||||
// if (owningCache)
|
||||
// NS_ADDREF(owningCache);
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsMsgFolderCacheElement::GetStringProperty(const char *propertyName, char **result)
|
||||
|
|
|
@ -258,7 +258,7 @@ nsresult nsMsgNotificationManager::AddNewMailNotification(nsIMsgFolder *folder)
|
|||
if(NS_SUCCEEDED(rv) && folderDescription)
|
||||
{
|
||||
sourceString = folderDescription;
|
||||
delete[] folderDescription;
|
||||
nsAllocator::Free(folderDescription);
|
||||
}
|
||||
rv = rdfService->GetLiteral(sourceString.GetUnicode(), getter_AddRefs(source));
|
||||
if(NS_SUCCEEDED(rv))
|
||||
|
|
Загрузка…
Ссылка в новой задаче