Skip to content
Snippets Groups Projects
Commit 47aafeb4 authored by Peter Hutterer's avatar Peter Hutterer
Browse files

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: default avatarPeter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: default avatarJonas Ådahl <jadahl@gmail.com>
parent f0fa5903
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment