Commit ffdd4bfa authored by Ralf Habacker's avatar Ralf Habacker
Browse files

Fix memory leaks

CCBUG:383592
parent 559917aa
......@@ -32,6 +32,7 @@ ToolBarStateArrow::ToolBarStateArrow(UMLScene *umlScene)
*/
ToolBarStateArrow::~ToolBarStateArrow()
{
cleanup();
}
/**
......@@ -41,6 +42,14 @@ void ToolBarStateArrow::init()
{
ToolBarState::init();
cleanup();
}
/**
* Clean up anything before deletion.
*/
void ToolBarStateArrow::cleanup()
{
while (!m_selectionRect.isEmpty())
delete m_selectionRect.takeFirst();
m_selectionRect.clear();
......
......@@ -35,6 +35,7 @@ public:
virtual ~ToolBarStateArrow();
virtual void init();
void cleanup();
protected:
......
......@@ -225,6 +225,8 @@ void ToolBarStateMessages::setFirstWidget(ObjectWidget* firstObject)
yclick = 0;
}
else {
if (m_messageLine)
delete m_messageLine;
m_messageLine = new QGraphicsLineItem();
m_pUMLScene->addItem(m_messageLine);
qreal x = m_pMouseEvent->scenePos().x();
......
......@@ -101,6 +101,10 @@ public:
~UMLAppPrivate()
{
delete logWindow;
delete stereotypesWindow;
delete objectsWindow;
delete editorWindow;
delete welcomeWindow;
}
public slots:
......
......@@ -60,6 +60,10 @@ AssociationLine::AssociationLine(AssociationWidget *association)
*/
AssociationLine::~AssociationLine()
{
delete m_startSymbol;
delete m_endSymbol;
delete m_subsetSymbol;
removeCollaborationLine();
}
/**
......
......@@ -226,6 +226,7 @@ AssociationWidget* AssociationWidget::create
*/
AssociationWidget::~AssociationWidget()
{
cleanup();
delete m_associationLine;
}
......
......@@ -45,6 +45,7 @@ SeqLineWidget::SeqLineWidget(UMLScene *scene, ObjectWidget * pObject)
*/
SeqLineWidget::~SeqLineWidget()
{
cleanupDestructionBox();
}
/**
......
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