summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOlivier Blin <olivier.blin@softathome.com>2015-05-04 17:30:31 +0200
committerOlivier Blin <qt@blino.org>2015-06-12 09:51:41 +0000
commite2bf8512c2363bb9f41d9357d4bf283ee5d58361 (patch)
tree64b043a543613313f01110506f04394b24ef6ce5
parent3fce7d79108fef745cad6232417eff7db15f98e3 (diff)
downloadqtwayland-e2bf8512c2363bb9f41d9357d4bf283ee5d58361.tar.gz
qtwayland-e2bf8512c2363bb9f41d9357d4bf283ee5d58361.tar.bz2
qtwayland-e2bf8512c2363bb9f41d9357d4bf283ee5d58361.zip
Fix private object leak in surface op/interface classes
Change-Id: I7ad508cb07a73d6699e9d2742ea029409f498a87 Reviewed-by: Giulio Camuffo <giulio.camuffo@jollamobile.com>
-rw-r--r--src/compositor/compositor_api/qwaylandsurfaceinterface.cpp6
-rw-r--r--src/compositor/compositor_api/qwaylandsurfaceinterface.h2
2 files changed, 8 insertions, 0 deletions
diff --git a/src/compositor/compositor_api/qwaylandsurfaceinterface.cpp b/src/compositor/compositor_api/qwaylandsurfaceinterface.cpp
index 9fc7fd6a..35577737 100644
--- a/src/compositor/compositor_api/qwaylandsurfaceinterface.cpp
+++ b/src/compositor/compositor_api/qwaylandsurfaceinterface.cpp
@@ -60,6 +60,7 @@ QWaylandSurfaceInterface::QWaylandSurfaceInterface(QWaylandSurface *surface)
QWaylandSurfaceInterface::~QWaylandSurfaceInterface()
{
d->surface->removeInterface(this);
+ delete d;
}
QWaylandSurface *QWaylandSurfaceInterface::surface() const
@@ -96,6 +97,11 @@ QWaylandSurfaceOp::QWaylandSurfaceOp(int t)
d->type = t;
}
+QWaylandSurfaceOp::~QWaylandSurfaceOp()
+{
+ delete d;
+}
+
int QWaylandSurfaceOp::type() const
{
return d->type;
diff --git a/src/compositor/compositor_api/qwaylandsurfaceinterface.h b/src/compositor/compositor_api/qwaylandsurfaceinterface.h
index 60d8ae5f..322037e6 100644
--- a/src/compositor/compositor_api/qwaylandsurfaceinterface.h
+++ b/src/compositor/compositor_api/qwaylandsurfaceinterface.h
@@ -62,6 +62,8 @@ public:
};
QWaylandSurfaceOp(int t);
+ virtual ~QWaylandSurfaceOp();
+
int type() const;
private: