Skip to content

Fix canvas leak

Lukas Möller requested to merge fix-canvas-leak into staging

I noticed that community solutions used a lot of memory after a while (> 1.5GB) and didn't clean up properly (refreshing solves the problem). Looking in the canvas debugger I saw that some mainCanvas elements were not released. After adding a quick console.log in the ReferenceManager class it seemed like there was a floating reference to mainCanvas elements that was only present if there were cuts on the page. It seems like I created two retained reference while rendering split canvas elements, but only released one after rendering.

It is currently leaking 1 canvas per page that has at least once cut (canvas elements are approx. 20MB in size).

(Added a missing key prop)

Edited by Lukas Möller

Merge request reports

Loading