if(mOwner) { nsIPluginInstance * inst; mOwner->GetInstance(inst);  if(inst) { nsCOMPtr<nsIPluginHost> host = do_GetService(kCPluginManagerCID); if(host) host->StopPluginInstance(inst);  NS_RELEASE(inst); } }
PluginViewerImpl::~PluginViewerImpl(){#ifdef XP_MAC  if (mOwner) mOwner->CancelTimer();#endif  NS_IF_RELEASE(mOwner);  if (nsnull != mWindow) {    mWindow->Destroy();    NS_RELEASE(mWindow);  }  NS_IF_RELEASE(mDocument);  NS_IF_RELEASE(mChannel);}