if (nsnull != mInstance) { PRBool doCache = PR_TRUE;   mInstance->GetValue(nsPluginInstanceVariable_DoCacheBool, (void *) &doCache); mInstance->Stop(); if (!doCache) {  mInstance->Destroy(); } else { nsCOMPtr<nsIPluginHost> host; host = do_GetService(kCPluginManagerCID); if(host) host->StopPluginInstance(mInstance); } NS_IF_RELEASE(mInstance); }
NS_IF_RELEASE(mInstance);
pluginInstanceOwner :: ~pluginInstanceOwner(){  // shut off the timer.  if (mPluginTimer != nsnull) {    CancelTimer();  }  if (nsnull != mInstance)  {    PRBool doCache = PR_TRUE;        // determine if the plugin wants to be cached    mInstance->GetValue(nsPluginInstanceVariable_DoCacheBool,                         (void *) &doCache);    mInstance->Stop();    if (!doCache) {      // if not, destroy the instance      mInstance->Destroy();    }    else {      nsCOMPtr<nsIPluginHost> host;      host = do_GetService(kCPluginManagerCID);      if(host)        host->StopPluginInstance(mInstance);    }    NS_IF_RELEASE(mInstance);  }  mWindow = nsnull;  mViewer = nsnull;}