From 37771717cc52340acbc716794875155e0f9868e8 Mon Sep 17 00:00:00 2001 From: Hajime Hoshi Date: Fri, 10 Sep 2021 02:17:19 +0900 Subject: [PATCH] internal/uidriver: Bug fix: Potential memory leak by [:0] Updates #1803 --- internal/uidriver/glfw/ui.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/uidriver/glfw/ui.go b/internal/uidriver/glfw/ui.go index d27667dfc..e0b9941cd 100644 --- a/internal/uidriver/glfw/ui.go +++ b/internal/uidriver/glfw/ui.go @@ -1064,7 +1064,7 @@ func (u *UserInterface) loop() error { // Create icon images in a different goroutine (#1478). // In the fullscreen mode, SetIcon fails (#1578). 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 // from this goroutine. At works only in between BeginFrame and EndFrame.