<div dir="ltr"><div>Hi,<br></div>To some degree this does not sound like a bug. At least for resources that are not presented to the user as being ref counted. But I would have expected that libinput_path_add_device would increase the ref count of the libinput_context and similar for seats. So as long as the device is not unref-ed to zero it would keep the context alive.<br><br>Additionally..<br><div><div><div class="gmail_extra"><br><div class="gmail_quote">2015-09-04 6:17 GMT+02:00 Peter Hutterer <span dir="ltr"><<a href="mailto:peter.hutterer@who-t.net" target="_blank">peter.hutterer@who-t.net</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">+ * [...]<br>
+ * @code<br>
+ * li = libinput_path_create_context(&interface, NULL);<br>
+ * device = libinput_path_add_device(li, "/dev/input/event0");<br>
+ * // get extra reference to device<br>
+ * libinput_device_ref(device);<br></blockquote><div><br></div><div>why is libinput_path_add_device not creating a device with a ref count of 1, just like the init function of the libinput context?</div>The current behavior looks inconsistent. Although that behavior does not cause trouble if the user sticks to a shut down sequence that unrefs devices first... <br></div><br></div><div class="gmail_extra">regards<br></div><div class="gmail_extra">Andreas<br></div></div></div></div>