From 3d8f8e6732d4815d1fdd7d6b1dbd1b22bb25a19c Mon Sep 17 00:00:00 2001 From: Thilo Graf Date: Sun, 17 Sep 2017 22:24:44 +0200 Subject: [PATCH] CKeyChooserItem: fix possible memleak Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/5a48398bb4133b09edecfaced3aa05a112fa877b Author: Thilo Graf Date: 2017-09-17 (Sun, 17 Sep 2017) ------------------ No further description and justification available within origin commit message! ------------------ This commit was generated by Migit --- src/gui/widget/keychooser.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/gui/widget/keychooser.cpp b/src/gui/widget/keychooser.cpp index 8cbf96e75..6d8f712ab 100644 --- a/src/gui/widget/keychooser.cpp +++ b/src/gui/widget/keychooser.cpp @@ -67,9 +67,9 @@ int CKeyChooserItem::exec(CMenuTarget* parent, const std::string &) // 10 seconds to choose a new key int timeout = 10; - CHintBox * hintbox = new CHintBox(name, LOCALE_KEYCHOOSER_TEXT, HINTBOX_MIN_WIDTH, NEUTRINO_ICON_SETTINGS, NEUTRINO_ICON_HINT_KEYS); - //hintbox->setTimeOut(timeout); - hintbox->paint(); + CHintBox hintbox(name, LOCALE_KEYCHOOSER_TEXT, HINTBOX_MIN_WIDTH, NEUTRINO_ICON_SETTINGS, NEUTRINO_ICON_HINT_KEYS); + //hintbox.setTimeOut(timeout); + hintbox.paint(); CFrameBuffer::getInstance()->blit(); @@ -92,7 +92,7 @@ int CKeyChooserItem::exec(CMenuTarget* parent, const std::string &) } g_RCInput->setLongPressAny(false); - hintbox->hide(); + hintbox.hide(); return res; }