bug 385086: null references to XPCOM components from the content pref service on shutdown so we don't leak them

r=sayrer
This commit is contained in:
myk@mozilla.org 2007-06-19 15:33:31 -07:00
Родитель 86d610bd40
Коммит babd9327c9
1 изменённых файлов: 19 добавлений и 2 удалений

Просмотреть файл

@ -81,8 +81,25 @@ ContentPrefService.prototype = {
_destroy: function ContentPrefService__destroy() {
this._observerSvc.removeObserver(this, "xpcom-shutdown");
// mozStorage shuts down the database for us automatically, but this
// helps us avoid the appearance of leaking the connection.
// Delete various references to XPCOM components so we don't leak them.
this.__observerSvc = null;
this.__consoleSvc = null;
this._grouper = null;
this.__stmtSelectPref = null;
this.__stmtSelectGlobalPref = null;
this.__stmtSelectGroupID = null;
this.__stmtInsertGroup = null;
this.__stmtSelectSettingID = null;
this.__stmtInsertSetting = null;
this.__stmtSelectPrefID = null;
this.__stmtSelectGlobalPrefID = null;
this.__stmtInsertPref = null;
this.__stmtUpdatePref = null;
this.__stmtDeletePref = null;
this.__stmtDeleteSettingIfUnused = null;
this.__stmtDeleteGroupIfUnused = null;
this.__stmtSelectPrefs = null;
this.__stmtSelectGlobalPrefs = null;
this._dbConnection = null;
},