Members of the KDE Community are recommended to subscribe to the kde-community mailing list at https://mail.kde.org/mailman/listinfo/kde-community to allow them to participate in important discussions and receive other important announcements

Commit da87d376 authored by Ralf Habacker's avatar Ralf Habacker

Fix memory leaks in class UMLDoc by not deleting class members and not...

Fix memory leaks in class UMLDoc by not deleting class members and not disconnecting signal/slot connections.

CCBUG:347498
parent c765a558
......@@ -150,8 +150,23 @@ void UMLDoc::createDatatypeFolder()
*/
UMLDoc::~UMLDoc()
{
UMLApp * pApp = UMLApp::app();
disconnect(this, SIGNAL(sigDiagramCreated(Uml::ID::Type)), pApp, SLOT(slotUpdateViews()));
disconnect(this, SIGNAL(sigDiagramRemoved(Uml::ID::Type)), pApp, SLOT(slotUpdateViews()));
disconnect(this, SIGNAL(sigDiagramRenamed(Uml::ID::Type)), pApp, SLOT(slotUpdateViews()));
disconnect(this, SIGNAL(sigCurrentViewChanged()), pApp, SLOT(slotCurrentViewChanged()));
disconnect(m_pAutoSaveTimer, SIGNAL(timeout()), this, SLOT(slotAutoSave()));
delete m_pAutoSaveTimer;
m_root[Uml::ModelType::Logical]->removeObject(m_datatypeRoot);
delete m_datatypeRoot;
for (int i = 0; i < Uml::ModelType::N_MODELTYPES; ++i) {
delete m_root[i];
}
delete m_pChangeLog;
qDeleteAll(m_stereoList);
}
/**
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment