fix memory leaks (nsMacMessage sink). r=pavlov, bug=15380

git-svn-id: svn://10.0.0.236/trunk@50302 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
beard%netscape.com
1999-10-09 03:08:56 +00:00
parent 8927726ce7
commit 79da82091a
2 changed files with 11 additions and 18 deletions

View File

@@ -74,11 +74,9 @@ NS_IMETHODIMP nsAppShell::SetDispatchListener(nsDispatchListener* aDispatchListe
NS_IMETHODIMP nsAppShell::Create(int* argc, char ** argv)
{
mToolKit = auto_ptr<nsToolkit>( new nsToolkit() );
mMacSink = new nsMacMessageSink();
mMacPump = auto_ptr<nsMacMessagePump>( new nsMacMessagePump(mToolKit.get(), mMacSink) );
return NS_OK;
mMacSink = auto_ptr<nsMacMessageSink>( new nsMacMessageSink() );
mMacPump = auto_ptr<nsMacMessagePump>( new nsMacMessagePump(mToolKit.get(), mMacSink.get()) );
return NS_OK;
}
//-------------------------------------------------------------------------
@@ -169,7 +167,6 @@ nsAppShell::nsAppShell()
}
mRefCnt = 0;
mExitCalled = PR_FALSE;
mMacSink = 0;
}
//-------------------------------------------------------------------------