Bug 385178. Memory leak when viewing feeds. r=gavin

This commit is contained in:
sayrer@gmail.com 2007-08-20 22:31:04 -07:00
parent e2707ed9d9
commit 910987398d
2 changed files with 12 additions and 1 deletions

View File

@ -132,6 +132,7 @@ FeedConverter.prototype = {
_releaseHandles: function FC__releaseHandles() {
this._listener = null;
this._request = null;
this._processor = null;
},
/**

View File

@ -847,6 +847,12 @@ FeedWriter.prototype = {
* See nsIFeedWriter
*/
close: function FW_close() {
this._document
.getElementById("handlersMenuPopup")
.removeEventListener("command", this, false);
this._document
.getElementById("subscribeButton")
.removeEventListener("command", this, false);
this._document = null;
this._window = null;
var prefs =
@ -857,7 +863,11 @@ FeedWriter.prototype = {
prefs.removeObserver(PREF_SELECTED_WEB, this);
prefs.removeObserver(PREF_SELECTED_APP, this);
this._removeFeedFromCache();
this.__faviconService = null;
this.__bundle = null;
this._selectedApplicationItemWrapped = null;
this._defaultSystemReaderItemWrapped = null;
this._FeedURI = null;
var historySvc = Cc[NH_CONTRACTID].getService(Ci.nsINavHistoryService);
historySvc.removeObserver(this);
},