changeset 218:806f47a7d324

Bug 3312: TConfiguration instance should be released at last https://github.com/HeapStats/heapstats/pull/83
author Yasumasa Suenaga <yasuenag@gmail.com>
date Sat, 04 Feb 2017 20:48:20 +0900
parents eff94370d9dc
children f6c76c7a8e56
files ChangeLog agent/src/heapstats-engines/libmain.cpp
diffstat 2 files changed, 7 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Mon Jan 30 22:39:05 2017 +0900
+++ b/ChangeLog	Sat Feb 04 20:48:20 2017 +0900
@@ -1,3 +1,7 @@
+2017-02-04  Yasumasa Suenaga <yasuenag@gmail.com>
+
+	* Bug 3312: TConfiguration instance should be released at last
+
 2017-01-30  Yasumasa Suenaga <yasuenag@gmail.com>
 
 	* Bug 3309: JDK 9 crashes at Agent_OnUnload()
--- a/agent/src/heapstats-engines/libmain.cpp	Mon Jan 30 22:39:05 2017 +0900
+++ b/agent/src/heapstats-engines/libmain.cpp	Sat Feb 04 20:48:20 2017 +0900
@@ -654,9 +654,6 @@
   /* Delete logger */
   delete logger;
 
-  /* Delete configuration */
-  delete conf;
-
   /* Free allocated configuration file path string. */
   free(loadConfigPath);
   loadConfigPath = NULL;
@@ -665,6 +662,9 @@
   if (conf->SnmpSend()->get()) {
     TTrapSender::finalize();
   }
+
+  /* Delete configuration */
+  delete conf;
 }
 
 /*!