Open ghost opened 6 years ago
shouldn't you clear memory returned from call ? (i.e. name array)
The first leak is your fault, see @alexzk1 comment.
The second is actually a problem in xdolib, but fixing it is easy, see: https://github.com/dpellegr/xdotool/commit/b88a8802d78a0225daf7f5e5c41cbd8769746af7
The third one is discussed and fixed here: https://github.com/jordansissel/xdotool/issues/189
It would be nice to have them pulled in a new release... note that in my fork I have those and a few other pulled in.
Tested on Ubuntu 16.04, gcc version 5.4.0., libxdo version 3.20150503.1.
xdo_get_focused_window_sane
,xdo_get_active_window
andxdo_get_window_name
calls leak memory. Seems to be down to calling libX11'sXGetWindowProperty
. The leak scales with the number of function calls, so repeatedly checking the focused window eats up a growing amount of memory. Related to #189 ?