Do we have memory leak issues? #132
-
Heyho, Due to my concerns with the Video widget and the memory leaks with it I started looking a bit into debugging memory leaks. Anyway, I stumbled into heaptrack, installed it and then I ran it against scale.nim to get a baseline, as I assumed scale.nim to be pretty stable in terms of memory consumption. I get heaptrack stats like this: Which leads me to my questions:
I'm particularly uncertain on the last part because I'm half convinced that is just because the program closed and not an actual issue, but I really don't have any good amount of low-level understanding here. Instructions to replicate:
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
I am under the impression that GTK widgets do not need to be unrefed, as they are automatically destroyed upon being removed from the widget tree. As we only create new GTK widgets in Did you already try adding a suppression file for GTK4 as suggested here? Edit: Sorry for the delays with the reviews, I was unexpectedly quite busy IRL. I hope to review some things later today. |
Beta Was this translation helpful? Give feedback.
With heaptrack specifically I have tried but was unsuccessful in removing the memory leak around brew.
I also managed to "prove" via g_object_weak_ref that the deallocation happens as you stated.
Minimal example for that for documentation purposes: