summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGiWoong Kim <giwoong.kim@samsung.com>2016-03-04 18:13:36 +0900
committerSeokYeon Hwang <syeon.hwang@samsung.com>2016-03-08 17:08:55 +0900
commit1487a83cff07bce08adc7154597df126fb0b2a96 (patch)
tree5401e00d4c8e4c5d73d0afe8fc5f700080488cbd
parent3956394944c566db1101d278ab5a65d55fdec880 (diff)
downloadqemu-1487a83cff07bce08adc7154597df126fb0b2a96.tar.gz
qemu-1487a83cff07bce08adc7154597df126fb0b2a96.tar.bz2
qemu-1487a83cff07bce08adc7154597df126fb0b2a96.zip
gui: remove memory leak
delete MainWindow class before emulator exit Change-Id: Id694cf58d2eebfbb2237e86a4fb7ea42d205bcb1 Signed-off-by: GiWoong Kim <giwoong.kim@samsung.com>
-rw-r--r--tizen/src/ui/input/keyboardhelper.cpp2
-rw-r--r--tizen/src/ui/input/keyboardshortcut.cpp2
-rw-r--r--tizen/src/ui/input/touchscreenhelper.cpp2
-rw-r--r--tizen/src/ui/layout/mainform.cpp2
-rw-r--r--tizen/src/ui/menu/advancedmenuitem.cpp2
-rw-r--r--tizen/src/ui/menu/scalemenuitem.cpp2
-rw-r--r--tizen/src/ui/menu/shellopener.cpp2
-rw-r--r--tizen/src/ui/qt5_supplement.cpp12
-rw-r--r--tizen/src/ui/skinbezelitem.cpp2
9 files changed, 9 insertions, 19 deletions
diff --git a/tizen/src/ui/input/keyboardhelper.cpp b/tizen/src/ui/input/keyboardhelper.cpp
index 57560cb130..08370c0dc0 100644
--- a/tizen/src/ui/input/keyboardhelper.cpp
+++ b/tizen/src/ui/input/keyboardhelper.cpp
@@ -597,5 +597,5 @@ void KeyboardHelper::keyReleased(QKeyEvent *event)
KeyboardHelper::~KeyboardHelper()
{
- qDebug("destroy keyboard helper");
+ /* do nothing */
}
diff --git a/tizen/src/ui/input/keyboardshortcut.cpp b/tizen/src/ui/input/keyboardshortcut.cpp
index 10be0ad3f1..c14f2cfdb6 100644
--- a/tizen/src/ui/input/keyboardshortcut.cpp
+++ b/tizen/src/ui/input/keyboardshortcut.cpp
@@ -104,7 +104,5 @@ void KeyboardShortcut::slotHwKeyShortcut(int keycode)
KeyboardShortcut::~KeyboardShortcut()
{
- qDebug("destroy keyboard shortcut");
-
hwKeyShortcutMap.clear();
}
diff --git a/tizen/src/ui/input/touchscreenhelper.cpp b/tizen/src/ui/input/touchscreenhelper.cpp
index 4d197c5747..eb168c132f 100644
--- a/tizen/src/ui/input/touchscreenhelper.cpp
+++ b/tizen/src/ui/input/touchscreenhelper.cpp
@@ -112,8 +112,6 @@ void TouchScreenHelper::touchMoved(QPoint hostPos, QPoint guestPos)
TouchScreenHelper::~TouchScreenHelper()
{
- qDebug("destroy touch screen helper");
-
if (mtTracker != NULL) {
delete mtTracker;
}
diff --git a/tizen/src/ui/layout/mainform.cpp b/tizen/src/ui/layout/mainform.cpp
index 0489245065..1ecf548adf 100644
--- a/tizen/src/ui/layout/mainform.cpp
+++ b/tizen/src/ui/layout/mainform.cpp
@@ -57,8 +57,6 @@ QPixmap *MainForm::getRotaryImage()
MainForm::~MainForm()
{
- qDebug("destroy main form");
-
if (displayType != NULL) {
delete displayType;
}
diff --git a/tizen/src/ui/menu/advancedmenuitem.cpp b/tizen/src/ui/menu/advancedmenuitem.cpp
index 5f4eea45fe..7cbe5561fe 100644
--- a/tizen/src/ui/menu/advancedmenuitem.cpp
+++ b/tizen/src/ui/menu/advancedmenuitem.cpp
@@ -42,8 +42,6 @@ QList<MenuItem *> &AdvancedMenuItem::getMenuList()
AdvancedMenuItem::~AdvancedMenuItem()
{
- qDebug("destroy an advanced menu item");
-
for (int i = 0; i < menuList.count(); i++) {
delete menuList.at(i);
}
diff --git a/tizen/src/ui/menu/scalemenuitem.cpp b/tizen/src/ui/menu/scalemenuitem.cpp
index 931996ec00..d088eba3bc 100644
--- a/tizen/src/ui/menu/scalemenuitem.cpp
+++ b/tizen/src/ui/menu/scalemenuitem.cpp
@@ -52,7 +52,5 @@ int ScaleMenuItem::getDefaultScaleFactor()
ScaleMenuItem::~ScaleMenuItem()
{
- qDebug("destroy a scale menu item");
-
factorMap.clear();
}
diff --git a/tizen/src/ui/menu/shellopener.cpp b/tizen/src/ui/menu/shellopener.cpp
index 20a95a4dce..cd1bc1d62d 100644
--- a/tizen/src/ui/menu/shellopener.cpp
+++ b/tizen/src/ui/menu/shellopener.cpp
@@ -84,5 +84,5 @@ void ShellOpener::openShell(QString title)
ShellOpener::~ShellOpener()
{
- qDebug("destroy shell opener");
+ /* do nothing */
}
diff --git a/tizen/src/ui/qt5_supplement.cpp b/tizen/src/ui/qt5_supplement.cpp
index 589cec0b45..f3346e23f3 100644
--- a/tizen/src/ui/qt5_supplement.cpp
+++ b/tizen/src/ui/qt5_supplement.cpp
@@ -269,6 +269,8 @@ void qt5_destroy()
{
qDebug("qt5 destroy");
+ mainwindow->terminateDisplaySwapper();
+
/* write most recently used data information */
QString mruPath(
uiInfo->getVmDataPath() + QDir::separator() + GUI_PROPERTIES_FILE);
@@ -300,17 +302,15 @@ void qt5_destroy()
qt5App->flush();
mainwindow->closeController();
- mainwindow->terminateDisplaySwapper();
qt5App->processEvents(QEventLoop::ExcludeUserInputEvents);
qt5App->quit();
-#if 0
- //FIXME: It causes SIGSEGV now...
- delete mainwindow;
+ delete mainwindow; /* All child widgets will be deleted automatically
+ in accordance with parent-child chain. */
mainwindow = NULL;
-#endif
-
+ delete qt5App;
+ qt5App = NULL;
delete uiInfo;
uiInfo = NULL;
}
diff --git a/tizen/src/ui/skinbezelitem.cpp b/tizen/src/ui/skinbezelitem.cpp
index 57889d371c..910aed773f 100644
--- a/tizen/src/ui/skinbezelitem.cpp
+++ b/tizen/src/ui/skinbezelitem.cpp
@@ -55,5 +55,5 @@ bool SkinBezelItem::isHWKeyHandling()
SkinBezelItem::~SkinBezelItem()
{
- qDebug("destroy bezel item");
+ /* do nothing */
}