if (nsnull != mInstance) { if (mPluginHost) mPluginHost->StopPluginInstance(mInstance); NS_IF_RELEASE(mInstance); }
NS_IF_RELEASE(mInstance);
nsPluginInstanceOwner::~nsPluginInstanceOwner(){  PRInt32 cnt;  // shut off the timer.  if (mPluginTimer != nsnull) {    CancelTimer();  }  if (nsnull != mInstance)  {    if (mPluginHost)      mPluginHost->StopPluginInstance(mInstance);    NS_IF_RELEASE(mInstance);  }  NS_IF_RELEASE(mPluginHost);  mOwner = nsnull;  for (cnt = 0; cnt < mNumAttrs; cnt++)  {    if ((nsnull != mAttrNames) && (nsnull != mAttrNames[cnt]))    {      PR_Free(mAttrNames[cnt]);      mAttrNames[cnt] = nsnull;    }    if ((nsnull != mAttrVals) && (nsnull != mAttrVals[cnt]))    {      PR_Free(mAttrVals[cnt]);      mAttrVals[cnt] = nsnull;    }  }  if (nsnull != mAttrNames)  {    PR_Free(mAttrNames);    mAttrNames = nsnull;  }  if (nsnull != mAttrVals)  {    PR_Free(mAttrVals);    mAttrVals = nsnull;  }  for (cnt = 0; cnt < mNumParams; cnt++)  {    if ((nsnull != mParamNames) && (nsnull != mParamNames[cnt]))    {      PR_Free(mParamNames[cnt]);      mParamNames[cnt] = nsnull;    }    if ((nsnull != mParamVals) && (nsnull != mParamVals[cnt]))    {      PR_Free(mParamVals[cnt]);      mParamVals[cnt] = nsnull;    }  }  if (nsnull != mParamNames)  {    PR_Free(mParamNames);    mParamNames = nsnull;  }  if (nsnull != mParamVals)  {    PR_Free(mParamVals);    mParamVals = nsnull;  }  if (nsnull != mDocumentBase)  {    nsCRT::free(mDocumentBase);    mDocumentBase = nsnull;  }    if (nsnull != mTagText)  {    nsCRT::free(mTagText);    mTagText = nsnull;  }  NS_IF_RELEASE(mWidget);  mContext = nsnull;}