Skip to content

Commit 93574b6

Browse files
#22 Fixed memory leak on texture update
1 parent a42ce73 commit 93574b6

File tree

4 files changed

+4
-2
lines changed

4 files changed

+4
-2
lines changed

dist/htmlgl.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8780,6 +8780,7 @@ will produce an inaccurate conversion value. The same issue exists with the cx/c
87808780
if (!this.haveSprite()) {
87818781
this.initSprite(this.texture);
87828782
} else {
8783+
this.sprite.texture.destroy();
87838784
this.sprite.setTexture(this.texture);
87848785
}
87858786

dist/htmlgl.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

page/js/htmlgl.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/gl-element.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@
6969
if (!this.haveSprite()) {
7070
this.initSprite(this.texture);
7171
} else {
72+
this.sprite.texture.destroy();
7273
this.sprite.setTexture(this.texture);
7374
}
7475

0 commit comments

Comments
 (0)