plug a bunch of memory leaks
svn path=/trunk/KDE/kdebase/workspace/lib/plasma/; revision=672687
This commit is contained in:
parent
e90845573e
commit
58277a7608
13
corona.cpp
13
corona.cpp
@ -56,6 +56,15 @@ public:
|
||||
engineExplorerAction(0)
|
||||
{
|
||||
}
|
||||
|
||||
~Private()
|
||||
{
|
||||
delete layout;
|
||||
while (!applets.isEmpty()) {
|
||||
delete applets.takeFirst();
|
||||
}
|
||||
}
|
||||
|
||||
bool immutable;
|
||||
Applet::List applets;
|
||||
FormFactor formFactor;
|
||||
@ -112,9 +121,7 @@ void Corona::init()
|
||||
|
||||
Corona::~Corona()
|
||||
{
|
||||
while (!d->applets.isEmpty()) {
|
||||
delete d->applets.takeFirst();
|
||||
}
|
||||
delete d;
|
||||
}
|
||||
|
||||
Location Corona::location() const
|
||||
|
@ -39,25 +39,29 @@ class DataEngineManager::Private
|
||||
{
|
||||
public:
|
||||
Private()
|
||||
: null(0)
|
||||
: nullEng(0)
|
||||
{}
|
||||
|
||||
~Private()
|
||||
{
|
||||
delete null;
|
||||
foreach (Plasma::DataEngine* engine, m_engines) {
|
||||
delete engine;
|
||||
}
|
||||
m_engines.clear();
|
||||
delete nullEng;
|
||||
}
|
||||
|
||||
DataEngine* nullEngine()
|
||||
{
|
||||
if (!null) {
|
||||
null = new NullEngine;
|
||||
if (!nullEng) {
|
||||
nullEng = new NullEngine;
|
||||
}
|
||||
|
||||
return null;
|
||||
return nullEng;
|
||||
}
|
||||
|
||||
DataEngine::Dict m_engines;
|
||||
DataEngine* null;
|
||||
DataEngine* nullEng;
|
||||
};
|
||||
|
||||
class DataEngineManagerSingleton
|
||||
@ -80,10 +84,7 @@ DataEngineManager::DataEngineManager()
|
||||
|
||||
DataEngineManager::~DataEngineManager()
|
||||
{
|
||||
foreach (Plasma::DataEngine* engine, d->m_engines) {
|
||||
delete engine;
|
||||
}
|
||||
d->m_engines.clear();
|
||||
delete d;
|
||||
}
|
||||
|
||||
Plasma::DataEngine* DataEngineManager::dataEngine(const QString& name) const
|
||||
|
2
svg.cpp
2
svg.cpp
@ -191,7 +191,7 @@ Svg::Svg(const QString& imagePath, QObject* parent)
|
||||
|
||||
Svg::~Svg()
|
||||
{
|
||||
|
||||
delete d;
|
||||
}
|
||||
|
||||
void Svg::paint(QPainter* painter, const QPointF& point, const QString& elementID)
|
||||
|
@ -60,6 +60,7 @@ Theme::Theme(QObject* parent)
|
||||
|
||||
Theme::~Theme()
|
||||
{
|
||||
delete d;
|
||||
}
|
||||
|
||||
QString Theme::themeName() const
|
||||
|
@ -37,6 +37,7 @@ LineEdit::LineEdit(QGraphicsItem *parent, QGraphicsScene *scene)
|
||||
|
||||
LineEdit::~LineEdit()
|
||||
{
|
||||
delete d;
|
||||
}
|
||||
|
||||
void LineEdit::paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget)
|
||||
|
@ -47,6 +47,8 @@ VBoxLayout::~VBoxLayout()
|
||||
foreach (LayoutItem *l, d->childList) {
|
||||
l->resetLayout();
|
||||
}
|
||||
|
||||
delete d;
|
||||
}
|
||||
|
||||
Qt::Orientations VBoxLayout::expandingDirections() const
|
||||
|
Loading…
Reference in New Issue
Block a user