Skip to content

Commit be95d75

Browse files
committed
Add Robert Scott to contributors, add documentation
1 parent a53d7eb commit be95d75

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

package.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,10 @@
7070
"name": "Niklas Närhinen",
7171
"email": "[email protected]"
7272
},
73+
{
74+
"name": "Robert Scott",
75+
"email": "[email protected]"
76+
},
7377
{
7478
"name": "Thomas McCarthy",
7579
"email": "[email protected]"

src/Page/PageCanvas.jsx

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,11 @@ export class PageCanvasInternal extends PureComponent {
2929

3030
componentWillUnmount() {
3131
this.cancelRenderingTask();
32+
33+
/**
34+
* Zeroing the width and height cause most browsers to release graphics
35+
* resources immediately, which can greatly reduce memory consumption.
36+
*/
3237
if (this.canvasLayer) {
3338
this.canvasLayer.width = 0;
3439
this.canvasLayer.height = 0;

0 commit comments

Comments
 (0)