Memory leak in GTK3
Changing image of one button inside GtkBox and setting sensitivity of another button in the same GtkBox to FALSE causing memory leak.
I described everything here: https://stackoverflow.com/questions/65338438/gtk-strange-memory-leak
It looks like bug to me, but maybe i am just doing something wrong.
I attached short main.c file which demonstrate problem. You can compile it with "gcc main.c `pkg-config --cflags gtk+-3.0` `pkg-config --libs gtk+-3.0`" command. If you run program you can easily see fast memory grow inside top program (or similar). I let this program run for 4 hours and it didn't stop growing. It started at 10MB and after 4 hours it used 182MB, so 18 times more. To check memory usage i used "echo 0 $(awk '/Private/ {print "+", $2}' /proc/PID/smaps) | bc" command. Here is a 4_hours_log.txt from running this command every 30s (memory is in kB).
I tested this on GTK 3.22.3 with Weston 5.0.
Interesting part is that when you comment line "gtk_widget_set_sensitive(stopButton, FALSE);" or "gtk_button_set_image (playorPauseButton,image);" there is 0 memory leak. So there must be some strange interaction between them.
I attach valgrind_test.log from program with growing memory. And valgrind_test2.log from program with no memory growth( with commented line "gtk_widget_set_sensitive(stopButton, FALSE);").
I tested this also on GTK 3.24.2 with Xorg but on this platform process(Xorg) is growing independently of commenting or uncommenting line "gtk_widget_set_sensitive(stopButton, FALSE)".