📝 Fixed some memory problems

RenderTexture leak in IsometricImageFurniVisualization, every direction change or thumbnail update leaked a GPU RenderTexture.
Image object leak in FurnitureDynamicThumbnailVisualization, now clears callbacks and src after use.
Image object leak in FurnitureBadgeDisplayVisualization, image objects never cleaned up
This commit is contained in:
duckietm
2026-03-31 15:20:28 +02:00
parent 2138d3a820
commit 44cb722f54
3 changed files with 29 additions and 3 deletions
@@ -340,6 +340,15 @@ export class FurnitureBadgeDisplayVisualization extends FurnitureAnimatedVisuali
ctx.clearRect(0, 0, badgeCanvas.width, badgeCanvas.height);
ctx.drawImage(img, 0, 0, badgeCanvas.width, badgeCanvas.height);
tex.source.update();
img.onload = null;
img.onerror = null;
img.src = '';
};
img.onerror = () =>
{
img.onload = null;
img.onerror = null;
img.src = '';
};
img.src = badgeUrl;
}