You've already forked Nitro_Render_V3
mirror of
https://github.com/duckietm/Nitro_Render_V3.git
synced 2026-06-20 07:26:18 +00:00
📝 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:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user