Re: Memory leak when drawing with pangomm/cairomm (MSYS2)




Thanks for your suggestions! 

I have already tried removing some of the code, and the memory leak persists even if there’s nothing to draw. But it may be other problems elsewhere, so I will try to construct a minimum project later and try other things if I have the time.

By the way, there’s no valgrind on Windows, and I will first try without such tools as I don’t frequently use Windows.

在 2021年6月25日,下午3:26,Kjell Ahlstedt <kjellahlstedt gmail com> 写道:

I don't know what caused the memory leak, but I'd like to give you a few suggestions for trouble-shooting.

The C++ bindings (gtkmm, pangomm, etc.) have no or extremely little code that's not identical on Windows and Linux. In the first place, suspect one of the underlying C modules (gtk, pango, etc.).

Do you know if there's a similar memory leak with gtkmm3? If there's no memory leak with gtkmm3, suspect gtk4.

Remove more and more of the code, possibly until there's nothing left to draw for queue_draw(). If the memory leak disappears at some step, you may have found the function that leaks memory.

Is valgrind or a similar memory analyzer available on Windows? If so, it can probably tell you who allocates a huge amount of memory.



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]