mirror of https://github.com/CGAL/cgal
fix memory leak
This commit is contained in:
parent
134b464aaa
commit
f6451700d1
|
|
@ -16,7 +16,7 @@
|
|||
|
||||
|
||||
MainWindow::MainWindow(QWidget* parent)
|
||||
: CGAL::Qt::DemosMainWindow(parent), myEngine(new QJSEngine())
|
||||
: CGAL::Qt::DemosMainWindow(parent), myEngine(new QJSEngine(this))
|
||||
{
|
||||
ui = new Ui::MainWindow;
|
||||
ui->setupUi(this);
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@ public:
|
|||
QJSEngine* myEngine;
|
||||
|
||||
Foo()
|
||||
: myEngine(new QJSEngine())
|
||||
: myEngine(new QJSEngine(this))
|
||||
{
|
||||
QJSValue baz = myEngine->newQObject(this);
|
||||
myEngine->.globalObject().setProperty("baz", baz);
|
||||
|
|
|
|||
Loading…
Reference in New Issue