From 663d780e718e9a1f646c80ef9f6636802529356b Mon Sep 17 00:00:00 2001 From: Roman Gilg Date: Wed, 27 Nov 2019 20:39:48 +0100 Subject: [PATCH] [server] Do not own dmabuf implementation Summary: The dmabuf implementation should be managed by the compositor and not by the interface which might go away through signals while the implementation goes away in the compositor simultaneously. Test Plan: Compiles. Reviewers: #kwin, davidedmundson Reviewed By: #kwin, davidedmundson Subscribers: kde-frameworks-devel Tags: #frameworks Differential Revision: https://phabricator.kde.org/D25576 --- src/wayland/server/linuxdmabuf_v1_interface.cpp | 5 +---- src/wayland/server/linuxdmabuf_v1_interface.h | 2 ++ 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/src/wayland/server/linuxdmabuf_v1_interface.cpp b/src/wayland/server/linuxdmabuf_v1_interface.cpp index bbc713532d..fd30f074e1 100644 --- a/src/wayland/server/linuxdmabuf_v1_interface.cpp +++ b/src/wayland/server/linuxdmabuf_v1_interface.cpp @@ -428,10 +428,7 @@ V1Iface::Private::Private(V1Iface *q, Display *display) { } -V1Iface::Private::~Private() -{ - delete impl; -} +V1Iface::Private::~Private() = default; void V1Iface::Private::bind(wl_client *client, uint32_t version, uint32_t id) { diff --git a/src/wayland/server/linuxdmabuf_v1_interface.h b/src/wayland/server/linuxdmabuf_v1_interface.h index f461dd17a4..5a6e47a9fc 100644 --- a/src/wayland/server/linuxdmabuf_v1_interface.h +++ b/src/wayland/server/linuxdmabuf_v1_interface.h @@ -146,6 +146,8 @@ public: /** * Sets the compositor implementation for the dmabuf interface. + * + * The ownership is not transferred by this call. */ void setImpl(Impl *impl);