Index: trunk/BNC/src/combination/bnccomb.cpp
===================================================================
--- trunk/BNC/src/combination/bnccomb.cpp	(revision 10224)
+++ trunk/BNC/src/combination/bnccomb.cpp	(revision 10225)
@@ -448,9 +448,7 @@
   // -----------------------------------------------------
   for (int ii = 0; ii < clkCorrections.size(); ii++) {
-    t_clkCorr* newClk = new t_clkCorr(clkCorrections[ii]);
-
-    char sys = newClk->_prn.system();
+    t_clkCorr& newClk = clkCorrections[ii];
+    char sys = newClk._prn.system();
     if (!_cmbSysPrn.contains(sys)){
-      delete newClk;
       continue;
     }
@@ -458,7 +456,6 @@
     // Check Modulo Time
     // -----------------
-    int sec = int(nint(newClk->_time.gpssec()*10));
+    int sec = int(nint(newClk._time.gpssec()*10));
     if (sec % (_cmbSampl*10) != 0.0) {
-      delete newClk;
       continue;
     }
@@ -468,5 +465,5 @@
     QString acName;
     bool isAPC;
-    QString staID(newClk->_staID.c_str());
+    QString staID(newClk._staID.c_str());
     QListIterator<cmbAC*> icAC(_ACs);
     while (icAC.hasNext()) {
@@ -479,5 +476,4 @@
     }
     if (acName.isEmpty() || isAPC != _masterIsAPC[sys]) {
-      delete newClk;
       continue;
     }
@@ -486,12 +482,11 @@
     // ----------------------------
     if (BNC_CORE->mode() != t_bncCore::batchPostProcessing) {
-      if ((newClk->_time >= currentTime) ||       // future time stamp
-          (currentTime - newClk->_time) > 60.0) { // very old data sets
+      if ((newClk._time >= currentTime) ||       // future time stamp
+          (currentTime - newClk._time) > 60.0) { // very old data sets
   #ifdef BNC_DEBUG_CMB
-        emit newMessage("bncComb: future or very old data sets: " + acName.toLatin1() + " " + newClk->_prn.toString().c_str() +
-            QString(" %1 ").arg(newClk->_time.timestr().c_str()).toLatin1() + "vs. current time" +
+        emit newMessage("bncComb: future or very old data sets: " + acName.toLatin1() + " " + newClk._prn.toString().c_str() +
+            QString(" %1 ").arg(newClk._time.timestr().c_str()).toLatin1() + "vs. current time" +
             QString(" %1 ").arg(currentTime.timestr().c_str()).toLatin1(), true);
   #endif
-        delete newClk;
         continue;
       }
@@ -500,11 +495,10 @@
     // Check Correction Age
     // --------------------
-    if (_resTime.valid() && newClk->_time <= _resTime) {
+    if (_resTime.valid() && newClk._time <= _resTime) {
 #ifdef BNC_DEBUG_CMB
-      emit newMessage("bncComb: old correction: " + acName.toLatin1() + " " + newClk->_prn.toString().c_str() +
-          QString(" %1 ").arg(newClk->_time.timestr().c_str()).toLatin1() + "vs. last processing Epoch" +
+      emit newMessage("bncComb: old correction: " + acName.toLatin1() + " " + newClk._prn.toString().c_str() +
+          QString(" %1 ").arg(newClk._time.timestr().c_str()).toLatin1() + "vs. last processing Epoch" +
           QString(" %1 ").arg(_resTime.timestr().c_str()).toLatin1(), true);
 #endif
-      delete newClk;
       continue;
     }
@@ -512,6 +506,6 @@
     // Set the last time
     // -----------------
-    if (_lastClkCorrTime.undef() || newClk->_time > _lastClkCorrTime) {
-      _lastClkCorrTime = newClk->_time;
+    if (_lastClkCorrTime.undef() || newClk._time > _lastClkCorrTime) {
+      _lastClkCorrTime = newClk._time;
     }
 
@@ -521,5 +515,5 @@
     deque<epoClkData*>::const_iterator it;
     for (it = _epoClkData.begin(); it != _epoClkData.end(); it++) {
-      if (newClk->_time == (*it)->_time) {
+      if (newClk._time == (*it)->_time) {
       epoch = *it;
         break;
@@ -527,7 +521,7 @@
     }
     if (epoch == 0) {
-      if (_epoClkData.empty() || newClk->_time > _epoClkData.back()->_time) {
+      if (_epoClkData.empty() || newClk._time > _epoClkData.back()->_time) {
         epoch = new epoClkData;
-        epoch->_time = newClk->_time;
+        epoch->_time = newClk._time;
         _epoClkData.push_back(epoch);
       }
@@ -538,7 +532,4 @@
     if (epoch != 0) {
       epoch->_clkCorr.push_back(newClk);
-    }
-    else {
-      delete newClk;
     }
   }
@@ -560,5 +551,5 @@
     }
 
-    const vector<t_clkCorr*>& clkCorrVec = _epoClkData.front()->_clkCorr;
+    const vector<t_clkCorr>& clkCorrVec = _epoClkData.front()->_clkCorr;
 
     bncTime epoTime = _epoClkData.front()->_time;
@@ -625,16 +616,16 @@
   corr->_orbCorr._xr    += dRAO;
   corr->_orbCorr._dotXr += dDotRAO;
-  corr->_clkCorr->_dClk  -= dC;
+  corr->_clkCorr._dClk  -= dC;
 }
 
 // Process Epoch
 ////////////////////////////////////////////////////////////////////////////
-void bncComb::processEpoch(bncTime epoTime, const vector<t_clkCorr*>& clkCorrVec) {
+void bncComb::processEpoch(bncTime epoTime, const vector<t_clkCorr>& clkCorrVec) {
 
   for (unsigned ii = 0; ii < clkCorrVec.size(); ii++) {
-    t_clkCorr* clkCorr = clkCorrVec.at(ii);
-    QString    staID(clkCorr->_staID.c_str());
-    QString    prn(clkCorr->_prn.toInternalString().c_str());
-    char       sys = clkCorr->_prn.system();
+    const t_clkCorr& clkCorr = clkCorrVec[ii];
+    QString    staID(clkCorr._staID.c_str());
+    QString    prn(clkCorr._prn.toInternalString().c_str());
+    char       sys = clkCorr._prn.system();
 
     // Find/Check the AC Name
@@ -656,6 +647,6 @@
     cmbCorr* newCorr       = new cmbCorr();
     newCorr->_prn          = prn;
-    newCorr->_time         = clkCorr->_time;
-    newCorr->_iod          = clkCorr->_iod;
+    newCorr->_time         = clkCorr._time;
+    newCorr->_iod          = clkCorr._iod;
     newCorr->_acName       = acName;
     newCorr->_weightFactor = weigthFactor;
@@ -670,11 +661,11 @@
     else {
       QMap<t_prn, t_orbCorr>& storage = _orbCorrections[acName];
-      if (!storage.contains(clkCorr->_prn)  ||
-           storage[clkCorr->_prn]._iod != newCorr->_iod) {
+      if (!storage.contains(clkCorr._prn)  ||
+           storage[clkCorr._prn]._iod != newCorr->_iod) {
         delete newCorr;
         continue;
       }
       else {
-        newCorr->_orbCorr = storage[clkCorr->_prn];
+        newCorr->_orbCorr = storage[clkCorr._prn];
       }
     }
@@ -686,5 +677,5 @@
     if (ephLast == 0) {
 #ifdef BNC_DEBUG_CMB
-      //emit newMessage("bncComb: eph not found for "  + prn.mid(0,3).toLatin1(), true);
+      emit newMessage("bncComb: eph not found for "  + prn.mid(0,3).toLatin1(), true);
 #endif
       delete newCorr;
@@ -695,5 +686,5 @@
              ephLast->checkState() == t_eph::unhealthy) {
 #ifdef BNC_DEBUG_CMB
-//      emit newMessage("bncComb: ephLast not ok (checkState: " +  ephLast->checkStateToString().toLatin1() + ") for "  + prn.mid(0,3).toLatin1(), true);
+      emit newMessage("bncComb: ephLast not ok (checkState: " +  ephLast->checkStateToString().toLatin1() + ") for "  + prn.mid(0,3).toLatin1(), true);
 #endif
       delete newCorr;
@@ -711,6 +702,6 @@
       else {
 #ifdef BNC_DEBUG_CMB
-//        emit newMessage("bncComb: eph not found for "  + prn.mid(0,3).toLatin1() +
-//                        QString(" with IOD %1").arg(newCorr->_iod).toLatin1(), true);
+        emit newMessage("bncComb: eph not found for "  + prn.mid(0,3).toLatin1() +
+                        QString(" with IOD %1").arg(newCorr->_iod).toLatin1(), true);
 #endif
         delete newCorr;
@@ -723,6 +714,6 @@
     if (_satCodeBiases.contains(acName)) {
       QMap<t_prn, t_satCodeBias>& storage = _satCodeBiases[acName];
-      if (storage.contains(clkCorr->_prn)) {
-        newCorr->_satCodeBias = storage[clkCorr->_prn];
+      if (storage.contains(clkCorr._prn)) {
+        newCorr->_satCodeBias = storage[clkCorr._prn];
         QMap<t_frequency::type, double> codeBiasesRefSig;
         for (unsigned ii = 1; ii < cmbRefSig::cIF; ii++) {
@@ -1046,5 +1037,5 @@
 
     // CLOCK
-    t_clkCorr clkCorr(static_cast<t_clkCorr>(*corr->_clkCorr));
+    t_clkCorr clkCorr(corr->_clkCorr);
     clkCorr._staID      = "INTERNAL";
     clkCorr._dClk       = corr->_dClkResult;
@@ -1186,5 +1177,5 @@
     }
 
-    ll(iObs) = (corr->_clkCorr->_dClk * t_CST::c - corr->_satCodeBiasIF) - DotProduct(AA.Row(iObs), x0);
+    ll(iObs) = (corr->_clkCorr._dClk * t_CST::c - corr->_satCodeBiasIF) - DotProduct(AA.Row(iObs), x0);
 
     PP(iObs, iObs) *= 1.0 / (corr->_weightFactor * corr->_weightFactor);
Index: trunk/BNC/src/combination/bnccomb.h
===================================================================
--- trunk/BNC/src/combination/bnccomb.h	(revision 10224)
+++ trunk/BNC/src/combination/bnccomb.h	(revision 10225)
@@ -99,5 +99,4 @@
     cmbCorr() {
       _eph                        = 0;
-      _clkCorr                    = 0;
       _iod                        = 0;
       _dClkResult                 = 0.0;
@@ -106,5 +105,4 @@
     }
     ~cmbCorr() {
-
     }
     QString        _prn;
@@ -113,5 +111,5 @@
     t_eph*         _eph;
     t_orbCorr      _orbCorr;
-    t_clkCorr*     _clkCorr;
+    t_clkCorr      _clkCorr;
     t_satCodeBias  _satCodeBias;
     QString        _acName;
@@ -142,10 +140,8 @@
     epoClkData() {}
     ~epoClkData() {
-      for (unsigned ii = 0; ii < _clkCorr.size(); ii++) {
-        delete _clkCorr[ii];
-      }
+      _clkCorr.erase(_clkCorr.begin(), _clkCorr.end());
     }
     bncTime                 _time;
-    std::vector<t_clkCorr*> _clkCorr;
+    std::vector<t_clkCorr> _clkCorr;
   };
 
@@ -231,5 +227,5 @@
   };
 
-  void  processEpoch(bncTime epoTime, const std::vector<t_clkCorr*>& clkCorrVec);
+  void  processEpoch(bncTime epoTime, const std::vector<t_clkCorr>& clkCorrVec);
   void  processSystem(bncTime epoTime, char sys, QTextStream& out);
   t_irc processEpoch_filter(bncTime epoTime, char sys, QTextStream& out, QMap<QString, cmbCorr*>& resCorr, ColumnVector& dx);
