<html>
<head>
<base href="https://bugs.freedesktop.org/" />
</head>
<body>
<p>
<div>
<b><a class="bz_bug_link
bz_status_ASSIGNED "
title="ASSIGNED - libinput_unref() frees memory even when clients hold references to devices or seats"
href="https://bugs.freedesktop.org/show_bug.cgi?id=91872#c1">Comment # 1</a>
on <a class="bz_bug_link
bz_status_ASSIGNED "
title="ASSIGNED - libinput_unref() frees memory even when clients hold references to devices or seats"
href="https://bugs.freedesktop.org/show_bug.cgi?id=91872">bug 91872</a>
from <span class="vcard"><a class="email" href="mailto:peter.hutterer@who-t.net" title="Peter Hutterer <peter.hutterer@who-t.net>"> <span class="fn">Peter Hutterer</span></a>
</span></b>
<pre>The options for fixing this issue introduce incompatible behavior, so I'm
closing this as a WONTFIX, this bug is mostly for archival purposes only.
If libinput_unref() changes to only do the work when all references are
accounted for, callers have to release all existing references manually. This
may cause a memory leak in existing callers.
In addition, the call to libinput_suspend() would not happen until the
resources are released, causing wakeups on top of the memory leaks.
If libinput_unref() calls libinput_suspend() but leaves the memory until all
references are released, the behaviour becomes unpredictable, and we get memory
leaks in existing callers.
Requiring an explicit call to libinput_suspend() breaks existing callers.
So really, no good fix here and since the current behavior is also that of
other libraries (e.g. libudev) we'll leave it as-is.</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are the assignee for the bug.</li>
</ul>
</body>
</html>