From 0bb147275d6f188c45803bb49b71858f0f4cc8e6 Mon Sep 17 00:00:00 2001 From: OlaviSau Date: Wed, 15 Jul 2015 23:30:22 +0300 Subject: [PATCH 1/2] fixed #322 blobURL cleanup Couldn't find tests to go along with the changes --- lib/torrent.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/torrent.js b/lib/torrent.js index 104a822d..de1f0f58 100644 --- a/lib/torrent.js +++ b/lib/torrent.js @@ -362,7 +362,10 @@ Torrent.prototype.destroy = function (cb) { clearInterval(self._rechokeIntervalId) self._rechokeIntervalId = null } - + + self.files.forEach(function (file) { + if (file._blobURL) window.URL.revokeObjectURL(file._blobURL) + }) if (self._torrentFileURL) window.URL.revokeObjectURL(self._torrentFileURL) var tasks = [] From 0998d6f4011925bc2749b419d096aabaad6a28d7 Mon Sep 17 00:00:00 2001 From: OlaviSau Date: Wed, 15 Jul 2015 23:43:32 +0300 Subject: [PATCH 2/2] Update torrent.js --- lib/torrent.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/torrent.js b/lib/torrent.js index de1f0f58..1227c00c 100644 --- a/lib/torrent.js +++ b/lib/torrent.js @@ -362,7 +362,7 @@ Torrent.prototype.destroy = function (cb) { clearInterval(self._rechokeIntervalId) self._rechokeIntervalId = null } - + self.files.forEach(function (file) { if (file._blobURL) window.URL.revokeObjectURL(file._blobURL) })