GTK 4.16.1: Huge memory leaks on Windows (GtkDrawingArea)

In GTK 4.16.1 on Windows, memory leaks occur with every widget redraw (GtkDrawingArea with simple shapes). My application, which refreshes at 60Hz, sees its memory usage climb to 2GB after just 30 seconds. However, with GTK 4.14.5, there are no memory leaks.

Note: It happens only when using GtkDrawingArea. There are no leaks when rendering with GtkGLArea.

I also observe (sometimes) this issue on apps that don’t contain any DrawingArea.

Seems to affect only the default ngl renderer. Switching back to the old gl solves the issue.

Has anyone some pointers where to look in GSK?

Interestingly, the size of the leak per draw is, depending on the widget size, in megabytes. So, it is really significant. It looks like someone forgot to delete the back buffers, or they’re being created every time. It should be simple to fix, I guess.

Fixed with gsk: Don't leak gl textures (!7725) · Merge requests · GNOME / gtk · GitLab

1 Like

This topic was automatically closed 45 days after the last reply. New replies are no longer allowed.