Zero the height and width of the PageView canvas before deleting.
This commit is contained in:
parent
da42fce118
commit
97cc06a7f9
@ -99,7 +99,13 @@ var PageView = function pageView(container, id, scale,
|
|||||||
this.annotationLayer = null;
|
this.annotationLayer = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
delete this.canvas;
|
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;
|
||||||
|
}
|
||||||
|
|
||||||
this.loadingIconDiv = document.createElement('div');
|
this.loadingIconDiv = document.createElement('div');
|
||||||
this.loadingIconDiv.className = 'loadingIcon';
|
this.loadingIconDiv.className = 'loadingIcon';
|
||||||
|
Loading…
x
Reference in New Issue
Block a user