Skip to content

Commit

Permalink
Remove unused canvas clean-up code in PDFThumbnailView.reset (PR …
Browse files Browse the repository at this point in the history
…13357 follow-up)
  • Loading branch information
Snuffleupagus committed Apr 30, 2023
1 parent d6ee4fa commit ee0659e
Showing 1 changed file with 0 additions and 7 deletions.
7 changes: 0 additions & 7 deletions web/pdf_thumbnail_view.js
Original file line number Diff line number Diff line change
Expand Up @@ -163,13 +163,6 @@ class PDFThumbnailView {
this.image?.replaceWith(this._placeholderImg);
this.#updateDims();

if (this.canvas) {
// Zeroing the width and height causes Firefox to release graphics
// resources immediately, which can greatly reduce memory consumption.
this.canvas.width = 0;
this.canvas.height = 0;
delete this.canvas;
}
if (this.image) {
this.image.removeAttribute("src");
delete this.image;
Expand Down

0 comments on commit ee0659e

Please sign in to comment.