mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-12-25 19:28:57 +01:00
internal/uidriver: Bug fix: Potential memory leak by [:0]
Updates #1803
This commit is contained in:
parent
dbe101a8ef
commit
37771717cc
@ -1064,7 +1064,7 @@ func (u *UserInterface) loop() error {
|
|||||||
// Create icon images in a different goroutine (#1478).
|
// Create icon images in a different goroutine (#1478).
|
||||||
// In the fullscreen mode, SetIcon fails (#1578).
|
// In the fullscreen mode, SetIcon fails (#1578).
|
||||||
if imgs := u.getIconImages(); len(imgs) > 0 && !u.isFullscreen() {
|
if imgs := u.getIconImages(); len(imgs) > 0 && !u.isFullscreen() {
|
||||||
u.setIconImages(imgs[:0])
|
u.setIconImages(nil)
|
||||||
|
|
||||||
// Convert the icons in the different goroutine, as (*ebiten.Image).At cannot be invoked
|
// Convert the icons in the different goroutine, as (*ebiten.Image).At cannot be invoked
|
||||||
// from this goroutine. At works only in between BeginFrame and EndFrame.
|
// from this goroutine. At works only in between BeginFrame and EndFrame.
|
||||||
|
Loading…
Reference in New Issue
Block a user