Note that libinput_unref() really destroys everything
This is both a bug and required behavior. A caller may hold refcounted references to devices, seats, or device groups but when libinput_unref() cleans up, all these become invalid. It is required behavior, because the last call to libinput_unref() also calls libinput_suspend() and thus stops any events. Any attempt at fixing this will break current behavior: * keeping structs until all refcounts are 0 may leak memory in current callers * it would require an explicit call to libinput_suspend(), or make libinput_unref() inconsistent in its behavior. So we document it as a bug and tell people not to do it. https://bugs.freedesktop.org/show_bug.cgi?id=91872 Signed-off-by:Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by:
Jonas Ådahl <jadahl@gmail.com>
Loading
Please register or sign in to comment