1
0
Fork 0
mirror of https://github.com/mozilla/pdf.js.git synced 2025-04-20 15:18:08 +02:00

Tried to add a destroy function to free memeory, but doesn't seem to help

This commit is contained in:
Julian Viereck 2011-09-16 08:09:58 -07:00
parent 20d8a13c9e
commit 921f8bd669
2 changed files with 24 additions and 1 deletions

View file

@ -50,6 +50,11 @@ function load() {
window.onload = load;
function nextTask() {
// If there is a pdfDoc on the last task executed, destroy it to free memory.
if (task && task.pdfDoc) {
task.pdfDoc.destroy();
delete task.pdfDoc;
}
if (currentTaskIdx == manifest.length) {
return done();
}