More memory leak fixes
This commit is contained in:
Родитель
796462c9fc
Коммит
4bdde58943
|
@ -226,7 +226,7 @@ nsresult nsCalendarShell::Init()
|
|||
/*
|
||||
* Register class factrories needed for application
|
||||
*/
|
||||
|
||||
NLS_Initialize(nsnull,nsnull);
|
||||
RegisterFactories() ;
|
||||
InitFactoryObjs();
|
||||
|
||||
|
|
|
@ -759,16 +759,18 @@ nsresult nsXPFCCanvas :: Init()
|
|||
nsRepository::RegisterFactory(kCVectorCID, XPFC_DLL, PR_FALSE, PR_FALSE);
|
||||
nsRepository::RegisterFactory(kCVectorIteratorCID, XPFC_DLL, PR_FALSE, PR_FALSE);
|
||||
|
||||
if (nsnull == mChildWidgets)
|
||||
{
|
||||
res = nsRepository::CreateInstance(kCVectorCID,
|
||||
nsnull,
|
||||
kCVectorCID,
|
||||
(void **)&mChildWidgets);
|
||||
|
||||
res = nsRepository::CreateInstance(kCVectorCID,
|
||||
nsnull,
|
||||
kCVectorCID,
|
||||
(void **)&mChildWidgets);
|
||||
if (NS_OK != res)
|
||||
return res ;
|
||||
|
||||
if (NS_OK != res)
|
||||
return res ;
|
||||
|
||||
mChildWidgets->Init();
|
||||
mChildWidgets->Init();
|
||||
}
|
||||
|
||||
CreateDefaultLayout();
|
||||
|
||||
|
@ -778,17 +780,19 @@ nsresult nsXPFCCanvas :: Init()
|
|||
nsresult nsXPFCCanvas :: CreateDefaultLayout()
|
||||
{
|
||||
nsresult res = NS_OK;
|
||||
|
||||
res = nsRepository::CreateInstance(kCBoxLayoutCID,
|
||||
nsnull,
|
||||
kCBoxLayoutCID,
|
||||
(void **)&mLayout);
|
||||
|
||||
if (mLayout == nsnull)
|
||||
{
|
||||
res = nsRepository::CreateInstance(kCBoxLayoutCID,
|
||||
nsnull,
|
||||
kCBoxLayoutCID,
|
||||
(void **)&mLayout);
|
||||
|
||||
if (NS_OK != res)
|
||||
return res ;
|
||||
|
||||
((nsBoxLayout *)mLayout)->Init(this);
|
||||
if (NS_OK != res)
|
||||
return res ;
|
||||
|
||||
((nsBoxLayout *)mLayout)->Init(this);
|
||||
}
|
||||
return res;
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче