Comment by unwind

1 day ago

Without further detail, that's not very helpful.

GTK doesn't implement garbage collection, you need to clean up by destroying widgets and other resources that you have created. Of course, the operating system will free all resources used by your process when it ends, so that kind of final cleanup is often omitted (and even more so in example code).

show me any example from oficial documentation gtk[1,2,3...] qt etc for no memory leak in valgrind

GTK intentionally doesn't calls free, unless some debug symbol is called. This is to prevent trashing before exiting, but is annoying when targeting correctness.