mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-19 22:58:07 +02:00
Merge pull request #4153 from sriram-dev/4027-destroy-previous-doc
4027 - Terminate worker of previous doc
This commit is contained in:
commit
8869b7e87e
1 changed files with 4 additions and 0 deletions
|
@ -524,6 +524,10 @@ var PDFView = {
|
|||
}
|
||||
}
|
||||
|
||||
// Terminate worker of the previous document if any.
|
||||
if (this.pdfDocument) {
|
||||
this.pdfDocument.destroy();
|
||||
}
|
||||
this.pdfDocument = null;
|
||||
var self = this;
|
||||
self.loading = true;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue