Fixed NewPartDialog leaking the memory allocated by the user interface.

Mon, 06 Mar 2017 00:41:13 +0200

author
Teemu Piippo <teemu@hecknology.net>
date
Mon, 06 Mar 2017 00:41:13 +0200
changeset 1197
e22cba39230a
parent 1196
0908803938f9
child 1198
f7151e4cd90f

Fixed NewPartDialog leaking the memory allocated by the user interface.

src/dialogs/newpartdialog.cpp file | annotate | diff | comparison | revisions
src/dialogs/newpartdialog.h file | annotate | diff | comparison | revisions
--- a/src/dialogs/newpartdialog.cpp	Mon Mar 06 00:40:23 2017 +0200
+++ b/src/dialogs/newpartdialog.cpp	Mon Mar 06 00:41:13 2017 +0200
@@ -42,6 +42,11 @@
 	ui.useCaLicense->setChecked (configuration().useCaLicense());
 }
 
+NewPartDialog::~NewPartDialog()
+{
+	delete &ui;
+}
+
 BfcStatement NewPartDialog::getWinding() const
 {
 	if (ui.windingCcw->isChecked())
--- a/src/dialogs/newpartdialog.h	Mon Mar 06 00:40:23 2017 +0200
+++ b/src/dialogs/newpartdialog.h	Mon Mar 06 00:41:13 2017 +0200
@@ -25,7 +25,8 @@
 {
 	Q_OBJECT
 public:
-	NewPartDialog (QWidget *parent);
+	NewPartDialog(QWidget *parent);
+	~NewPartDialog();
 
 	QString author() const;
 	void fillHeader (LDDocument* newdoc) const;

mercurial