fix(ui): properly destroy entities in manager cleanup

This commit is contained in:
psychedelicious 2024-08-07 18:17:52 +10:00
parent 2159319035
commit e0b60e4320

View File

@ -605,6 +605,16 @@ export class CanvasManager {
return () => {
this.log.debug('Cleaning up konva renderer');
this.inpaintMask.destroy();
for (const region of this.regions.values()) {
region.destroy();
}
for (const layer of this.layers.values()) {
layer.destroy();
}
for (const controlAdapter of this.controlAdapters.values()) {
controlAdapter.destroy();
}
unsubscribeRenderer();
unsubscribeListeners();
unsubscribeShouldShowStagedImage();