Put NS_INIT_REFCNT in all constructors, it says. So I moved this call out of the Initialize() method, and into the constructor. And lo! the assert went away. Magic.

git-svn-id: svn://10.0.0.236/trunk@19404 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
mcmullen%netscape.com
1999-02-03 03:13:53 +00:00
parent 9cce639e0f
commit b2c0217a0d
2 changed files with 12 additions and 20 deletions

View File

@@ -60,15 +60,19 @@ protected:
nsCmdLineService::nsCmdLineService()
: mArgCount(0)
{
mArgCount = 0;
NS_INIT_REFCNT();
}
/*
* Implement the nsISupports methods...
*/
NS_IMPL_ISUPPORTS(nsCmdLineService, kICommandLineServiceIID);
NS_IMETHODIMP
nsCmdLineService::Initialize(int argc, char ** argv)
{
NS_INIT_REFCNT();
PRInt32 i=0;
nsresult rv = nsnull;
@@ -233,14 +237,6 @@ nsCmdLineService::PrintCmdArgs()
}
#endif
/*
* Implement the nsISupports methods...
*/
NS_IMPL_ISUPPORTS(nsCmdLineService, kICommandLineServiceIID);
NS_EXPORT nsresult NS_NewCmdLineService(nsICmdLineService** aResult)
{
if (nsnull == aResult) {