Bug 81745 - wl_data_device lacks destructor protocol, causes leaks
Summary: wl_data_device lacks destructor protocol, causes leaks
Alias: None
Product: Wayland
Classification: Unclassified
Component: wayland (show other bugs)
Version: 1.5.0
Hardware: All All
: medium major
Assignee: kabeer
QA Contact:
Depends on:
Reported: 2014-07-25 14:28 UTC by Pekka Paalanen
Modified: 2014-11-04 13:35 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Description Pekka Paalanen 2014-07-25 14:28:24 UTC
wl_data_device interface does not have a destructor defined in the protocol, which means that the server cannot know if a client destroys a wl_data_device object. This leaks the server-side resource.

To make things worse, wl_data_device.data_offer *event* creates a new wl_data_offer protocol object.

If a client has destroyed a wl_data_device, the server will not know about it, and will keep sending data_offer events as appropriate. As the client does not track the wl_data_device object anymore, those events will be ignored in the client. This means that in the server, wl_data_offer objects just keep piling up, as the server cannot destroy them on its own.

If possible, we should add destructor protocol to wl_data_device interface.
Comment 1 Pekka Paalanen 2014-11-04 13:35:07 UTC
commit 0953e126d7836781a3310e85c9b5a0e6408b2a49
Author: kabeer khan <kabeer.khan@samsung.com>
Date:   Mon Oct 13 10:34:26 2014 +0530

    Protocol : Added destructor to wl_data_device interface

in Wayland, and implementations in Weston.

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.