summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichele Calgaro <michele.calgaro@yahoo.it>2023-12-22 16:38:07 +0900
committerMichele Calgaro <michele.calgaro@yahoo.it>2023-12-22 16:38:07 +0900
commitd99a435c55f3229a6bb577e6be4c0af9e06995f1 (patch)
tree2ae66c619c773aa59915ddf52c39b0a7788f0cb2
parent0d4db05e52daaf999aa78bab91671c83644398e3 (diff)
downloadkstreamripper-d99a435c55f3229a6bb577e6be4c0af9e06995f1.tar.gz
kstreamripper-d99a435c55f3229a6bb577e6be4c0af9e06995f1.zip
Properly deallocate memory on exit
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
-rw-r--r--src/kstreamripper.cpp2
-rw-r--r--src/main.cpp19
2 files changed, 4 insertions, 17 deletions
diff --git a/src/kstreamripper.cpp b/src/kstreamripper.cpp
index 1c8c53d..44dc7a4 100644
--- a/src/kstreamripper.cpp
+++ b/src/kstreamripper.cpp
@@ -137,6 +137,7 @@ KStreamRipper::KStreamRipper( TQWidget* parent, const char* name )
KStreamRipper::~KStreamRipper()
{
+ delete contextMenu;
}
@@ -175,7 +176,6 @@ void KStreamRipper::closeEvent( TQCloseEvent *e )
appConfig->sync();
e->accept();
- delete contextMenu;
}
diff --git a/src/main.cpp b/src/main.cpp
index e249247..ac2397e 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -47,20 +47,7 @@ int main( int argc, char *argv[] )
mainWidget->resize( 700, 600 );
- return app.exec();
+ int res = app.exec();
+ delete mainWidget;
+ return res;
}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-