mirror of
https://bitbucket.org/smil3y/kdelibs.git
synced 2025-02-23 18:32:49 +00:00
kdeui: plug some memory leaks
Signed-off-by: Ivailo Monev <xakepa10@laimg.moc>
This commit is contained in:
parent
90ce55bb9f
commit
ae98b867a0
2 changed files with 17 additions and 11 deletions
|
@ -41,16 +41,6 @@
|
|||
#include <X11/extensions/Xfixes.h>
|
||||
#endif
|
||||
|
||||
class KWindowSystemStaticContainer {
|
||||
public:
|
||||
KWindowSystemStaticContainer() : d(0) {}
|
||||
KWindowSystem kwm;
|
||||
KWindowSystemPrivate* d;
|
||||
};
|
||||
|
||||
|
||||
K_GLOBAL_STATIC(KWindowSystemStaticContainer, g_kwmInstanceContainer)
|
||||
|
||||
static Atom net_wm_cm;
|
||||
static void create_atoms( Display* dpy = QX11Info::display() );
|
||||
|
||||
|
@ -114,6 +104,17 @@ public:
|
|||
bool removeStrutWindow( WId );
|
||||
};
|
||||
|
||||
class KWindowSystemStaticContainer {
|
||||
public:
|
||||
KWindowSystemStaticContainer() : d(0) {}
|
||||
~KWindowSystemStaticContainer() { if (d) d->deleteLater(); }
|
||||
KWindowSystem kwm;
|
||||
KWindowSystemPrivate* d;
|
||||
};
|
||||
|
||||
|
||||
K_GLOBAL_STATIC(KWindowSystemStaticContainer, g_kwmInstanceContainer)
|
||||
|
||||
KWindowSystemPrivate::KWindowSystemPrivate(int _what)
|
||||
: QWidget(0),
|
||||
NETRootInfo( QX11Info::display(),
|
||||
|
|
|
@ -51,6 +51,12 @@ public:
|
|||
}
|
||||
~KXMLGUIClientPrivate()
|
||||
{
|
||||
if (m_actionCollection) {
|
||||
m_actionCollection->deleteLater();
|
||||
}
|
||||
if (m_builder) {
|
||||
delete m_builder;
|
||||
}
|
||||
}
|
||||
|
||||
bool mergeXML( QDomElement &base, QDomElement &additive,
|
||||
|
@ -108,7 +114,6 @@ KXMLGUIClient::~KXMLGUIClient()
|
|||
client->d->m_parent = 0;
|
||||
}
|
||||
|
||||
delete d->m_actionCollection;
|
||||
delete d;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue