Index: trunk/BNC/src/bnccore.cpp
===================================================================
--- trunk/BNC/src/bnccore.cpp	(revision 7855)
+++ trunk/BNC/src/bnccore.cpp	(revision 7856)
@@ -141,4 +141,5 @@
   delete _rawFile;
   delete _bncComb;
+  delete _pppMain;
 }
 
Index: trunk/BNC/src/pppMain.cpp
===================================================================
--- trunk/BNC/src/pppMain.cpp	(revision 7855)
+++ trunk/BNC/src/pppMain.cpp	(revision 7856)
@@ -103,4 +103,10 @@
       t_pppThread* pppThread = it.next();
       pppThread->exit();
+      if (BNC_CORE->mode() != t_bncCore::interactive) {
+        while(!pppThread->isFinished()) {
+          pppThread->wait();
+        }
+        delete pppThread;
+      }
     }
     _pppThreads.clear();
Index: trunk/BNC/src/pppMain.h
===================================================================
--- trunk/BNC/src/pppMain.h	(revision 7855)
+++ trunk/BNC/src/pppMain.h	(revision 7856)
@@ -5,4 +5,5 @@
 #include "pppOptions.h"
 #include "pppThread.h"
+#include "bnccore.h"
 
 namespace BNC_PPP {
Index: trunk/BNC/src/pppRun.cpp
===================================================================
--- trunk/BNC/src/pppRun.cpp	(revision 7855)
+++ trunk/BNC/src/pppRun.cpp	(revision 7856)
@@ -224,4 +224,5 @@
   delete _snxtroFile;
   while (!_epoData.empty()) {
+    delete _epoData.front(); 
     _epoData.pop_front();
   }
Index: trunk/BNC/src/pppThread.cpp
===================================================================
--- trunk/BNC/src/pppThread.cpp	(revision 7855)
+++ trunk/BNC/src/pppThread.cpp	(revision 7856)
@@ -36,5 +36,5 @@
  * Created:    29-Jul-2014
  *
- * Changes:    
+ * Changes:
  *
  * -----------------------------------------------------------------------*/
@@ -62,5 +62,5 @@
   connect(this, SIGNAL(finished()), this, SLOT(deleteLater()));
 
-  connect(this, SIGNAL(newMessage(QByteArray,bool)), 
+  connect(this, SIGNAL(newMessage(QByteArray,bool)),
           BNC_CORE, SLOT(slotMessage(const QByteArray,bool)));
 }
@@ -75,5 +75,5 @@
 ////////////////////////////////////////////////////////////////////////////
 void t_pppThread::run() {
-  
+
   try {
     _pppRun = new t_pppRun(_opt);
