зеркало из https://github.com/mozilla/pjs.git
Fix ref count oddities.
This commit is contained in:
Родитель
6023691778
Коммит
d7a9a4ee52
|
@ -32,7 +32,7 @@ int32 nsObject::s_nObjects = 0;
|
|||
nsObject::nsObject(nsISupports *aOuter)
|
||||
{
|
||||
// ref count init
|
||||
mRefCnt = 1;
|
||||
mRefCnt = 0;
|
||||
// assign outer
|
||||
if (aOuter)
|
||||
mOuter = aOuter;
|
||||
|
|
|
@ -213,9 +213,6 @@ nsresult nsWidgetFactory::CreateInstance(nsISupports *aOuter,
|
|||
// We didn't get the right interface, so clean up
|
||||
delete inst;
|
||||
}
|
||||
else {
|
||||
NS_RELEASE(inst);
|
||||
}
|
||||
|
||||
return res;
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче