fix memory leak

pull/1/head
Johan Smith Agudelo Rodriguez 8 years ago
parent ef7caa72e2
commit 2b4bbd20f2

@ -58,7 +58,7 @@ AbstractWindowInterface &AbstractWindowInterface::self()
if (KWindowSystem::isPlatformWayland()) {
//! TODO: WaylandWindowInterface
} else /* if(KWindowSystem::isPlatformX11) */ {
m_wm = new XWindowInterface;
m_wm = std::make_unique<XWindowInterface>();
}
return *m_wm;
@ -66,4 +66,4 @@ AbstractWindowInterface &AbstractWindowInterface::self()
}
QPointer<Latte::AbstractWindowInterface> Latte::AbstractWindowInterface::m_wm;
std::unique_ptr<Latte::AbstractWindowInterface> Latte::AbstractWindowInterface::m_wm;

@ -88,7 +88,7 @@ protected:
std::list<WId> m_docks;
QPointer<KActivities::Consumer> m_activities;
static QPointer<AbstractWindowInterface> m_wm;
static std::unique_ptr<AbstractWindowInterface> m_wm;
};
// namespace alias

Loading…
Cancel
Save