mPrefs->UnregisterCallback("bidi.", PrefChangedCallback, (void*)this); #endif } #ifdef IBMBIDI if (mBidiUtils) { delete mBidiUtils; }
nsContentUtils::UnregisterPrefCallback("bidi.", PrefChangedCallback, this);  delete mBidiUtils;
nsPresContext::~nsPresContext(){  mImageLoaders.Enumerate(destroy_loads);  NS_PRECONDITION(!mShell, "Presshell forgot to clear our mShell pointer");  SetShell(nsnull);  if (mEventManager) {    mEventManager->SetPresContext(nsnull);   // unclear if this is needed, but can't hurt    NS_RELEASE(mEventManager);  }  // Unregister preference callbacks  if (mPrefs) {    mPrefs->UnregisterCallback("font.", nsPresContext::PrefChangedCallback, (void*)this);    mPrefs->UnregisterCallback("browser.display.", nsPresContext::PrefChangedCallback, (void*)this);    mPrefs->UnregisterCallback("browser.underline_anchors", nsPresContext::PrefChangedCallback, (void*)this);    mPrefs->UnregisterCallback("browser.anchor_color", nsPresContext::PrefChangedCallback, (void*)this);    mPrefs->UnregisterCallback("browser.active_color", nsPresContext::PrefChangedCallback, (void*)this);    mPrefs->UnregisterCallback("browser.visited_color", nsPresContext::PrefChangedCallback, (void*)this);    mPrefs->UnregisterCallback("network.image.imageBehavior", nsPresContext::PrefChangedCallback, (void*)this);    mPrefs->UnregisterCallback("image.animation_mode", nsPresContext::PrefChangedCallback, (void*)this);#ifdef IBMBIDI    mPrefs->UnregisterCallback("bidi.", PrefChangedCallback, (void*)this);#endif  }#ifdef IBMBIDI  if (mBidiUtils) {    delete mBidiUtils;  }#endif // IBMBIDI  NS_IF_RELEASE(mDeviceContext);  NS_IF_RELEASE(mLookAndFeel);  NS_IF_RELEASE(mLanguage);}