Index: /trunk/BNC/src/combination/bncbiassnx.cpp
===================================================================
--- /trunk/BNC/src/combination/bncbiassnx.cpp	(revision 10215)
+++ /trunk/BNC/src/combination/bncbiassnx.cpp	(revision 10216)
@@ -297,5 +297,5 @@
 ////////////////////////////////////////////////////////////////////////////
 void bncBiasSnx::determineSsrSatCodeBiases(QString prn, double aIF1, double aIF2,
-                                           t_satCodeBias* satCodeBias) {
+                                           t_satCodeBias& satCodeBias) {
   std::string rnxType2ch;
   double value;
@@ -520,5 +520,5 @@
 
 void bncBiasSnx::setSsrSatCodeBias(std::string rnxType2ch, double value,
-                                    t_satCodeBias* satCodeBias) {
+                                    t_satCodeBias& satCodeBias) {
   t_frqCodeBias frqCodeBias;
 
@@ -526,5 +526,5 @@
   frqCodeBias._value = value;
 
-  satCodeBias->_bias.push_back(frqCodeBias);
+  satCodeBias._bias.push_back(frqCodeBias);
   return;
 }
Index: /trunk/BNC/src/combination/bncbiassnx.h
===================================================================
--- /trunk/BNC/src/combination/bncbiassnx.h	(revision 10215)
+++ /trunk/BNC/src/combination/bncbiassnx.h	(revision 10216)
@@ -49,5 +49,7 @@
     _startTime = startTime;
   }
-  ~snxSatCodeBias() {_biasMap.clear();}
+  ~snxSatCodeBias() {
+    _biasMap.clear();
+  }
   bncTime               _startTime;
   QMap<QString, double> _biasMap;
@@ -59,6 +61,6 @@
   ~bncBiasSnx();
   t_irc readFile(const QString& fileName);
-  void determineSsrSatCodeBiases(QString prn, double aIF1, double aIF2, t_satCodeBias* satCodeBias);
-  void setSsrSatCodeBias(std::string rnxType2ch, double value, t_satCodeBias* satCodeBias);
+  void determineSsrSatCodeBiases(QString prn, double aIF1, double aIF2, t_satCodeBias& satCodeBias);
+  void setSsrSatCodeBias(std::string rnxType2ch, double value, t_satCodeBias& satCodeBias);
 
  private:
Index: /trunk/BNC/src/combination/bnccomb.cpp
===================================================================
--- /trunk/BNC/src/combination/bnccomb.cpp	(revision 10215)
+++ /trunk/BNC/src/combination/bnccomb.cpp	(revision 10216)
@@ -295,5 +295,4 @@
   }
 
-
   // Maximal Residuum
   // ----------------
@@ -311,7 +310,10 @@
     delete icAC.next();
   }
+
   delete _rtnetDecoder;
+
   if (_ssrCorr) {
     delete _ssrCorr;
+
   }
   delete _antex;
@@ -327,8 +329,10 @@
     _buffer.remove(sys);
   }
+
   while (!_epoClkData.empty()) {
     delete _epoClkData.front();
     _epoClkData.pop_front();
   }
+
 }
 
@@ -388,9 +392,6 @@
     // Store the correction
     // --------------------
-    QMap<t_prn, t_orbCorr*>& storage = _orbCorrections[acName];
-    if (storage[orbCorr._prn]) {
-      delete  storage[orbCorr._prn];
-    }
-    storage[orbCorr._prn] = new t_orbCorr(orbCorr);
+    QMap<t_prn, t_orbCorr>& storage = _orbCorrections[acName];
+    storage[orbCorr._prn] = orbCorr;
   }
 }
@@ -427,9 +428,6 @@
     // Store the correction
     // --------------------
-    QMap<t_prn, t_satCodeBias*>& storage = _satCodeBiases[acName];
-    if (storage[satCodeBias._prn]) {
-      delete storage[satCodeBias._prn];
-    }
-    storage[satCodeBias._prn] = new t_satCodeBias(satCodeBias);
+    QMap<t_prn, t_satCodeBias>& storage = _satCodeBiases[acName];
+    storage[satCodeBias._prn] = satCodeBias;
   }
 }
@@ -623,7 +621,7 @@
   corr->_eph = lastEph;
 
-  corr->_orbCorr->_xr    += dRAO;
-  corr->_orbCorr->_dotXr += dDotRAO;
-  corr->_clkCorr->_dClk  -= dC;
+  corr->_orbCorr._xr    += dRAO;
+  corr->_orbCorr._dotXr += dDotRAO;
+  corr->_clkCorr._dClk  -= dC;
 }
 
@@ -660,5 +658,5 @@
     newCorr->_acName       = acName;
     newCorr->_weightFactor = weigthFactor;
-    newCorr->_clkCorr = new t_clkCorr(*clkCorrVec[ii]);
+    newCorr->_clkCorr      = t_clkCorr(static_cast<t_clkCorr>(*clkCorr));
 
     // Check orbit correction
@@ -669,7 +667,7 @@
     }
     else {
-      QMap<t_prn, t_orbCorr*>& storage = _orbCorrections[acName];
+      QMap<t_prn, t_orbCorr>& storage = _orbCorrections[acName];
       if (!storage.contains(clkCorr->_prn)  ||
-           storage[clkCorr->_prn]->_iod != newCorr->_iod) {
+           storage[clkCorr->_prn]._iod != newCorr->_iod) {
         delete newCorr;
         continue;
@@ -686,5 +684,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 +693,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 +709,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;
@@ -722,5 +720,5 @@
     // ----------------------------
     if (_satCodeBiases.contains(acName)) {
-      QMap<t_prn, t_satCodeBias*>& storage = _satCodeBiases[acName];
+      QMap<t_prn, t_satCodeBias>& storage = _satCodeBiases[acName];
       if (storage.contains(clkCorr->_prn)) {
         newCorr->_satCodeBias = storage[clkCorr->_prn];
@@ -731,6 +729,6 @@
           char attrib = cmbRefSig::toAttrib(sys, static_cast<cmbRefSig::type>(ii));
           QString rnxType2ch = QString("%1%2").arg(frqNum).arg(attrib);
-          for (unsigned ii = 0; ii < newCorr->_satCodeBias->_bias.size(); ii++) {
-            const t_frqCodeBias& bias = newCorr->_satCodeBias->_bias[ii];
+          for (unsigned ii = 0; ii < newCorr->_satCodeBias._bias.size(); ii++) {
+            const t_frqCodeBias& bias = newCorr->_satCodeBias._bias[ii];
             if (rnxType2ch.toStdString() == bias._rnxType2ch) {
               codeBiasesRefSig[frqType] = bias._value;
@@ -748,5 +746,5 @@
           }
         }
-        newCorr->_satCodeBias->_bias.clear();
+        newCorr->_satCodeBias._bias.clear();
       }
     }
@@ -876,7 +874,4 @@
             t_frequency::type fType1 = cmbRefSig::toFreq(sys, cmbRefSig::c1);
             t_frequency::type fType2 = cmbRefSig::toFreq(sys, cmbRefSig::c2);
-            if (resCorr[pp->prn]->_satCodeBias == 0) {
-              resCorr[pp->prn]->_satCodeBias = new t_satCodeBias();
-            }
             _bsx->determineSsrSatCodeBiases(pp->prn.mid(0,3), codeCoeff[fType1], codeCoeff[fType2], resCorr[pp->prn]->_satCodeBias);
           }
@@ -895,6 +890,5 @@
     dumpResults(epoTime, resCorr);
   }
-  // Delete Data
-  // -----------
+
   _buffer.remove(sys);
 }
@@ -1044,10 +1038,10 @@
 
     // ORBIT
-    t_orbCorr orbCorr(static_cast<t_orbCorr>(*corr->_orbCorr));
+    t_orbCorr orbCorr(corr->_orbCorr);
     orbCorr._staID = "INTERNAL";
     orbCorrections.push_back(orbCorr);
 
     // CLOCK
-    t_clkCorr clkCorr(static_cast<t_clkCorr>(*corr->_clkCorr));
+    t_clkCorr clkCorr(corr->_clkCorr);
     clkCorr._staID      = "INTERNAL";
     clkCorr._dClk       = corr->_dClkResult;
@@ -1113,6 +1107,6 @@
 
     // CODE BIASES
-    if (corr->_satCodeBias) {
-      t_satCodeBias satCodeBias(static_cast<t_satCodeBias>(*corr->_satCodeBias));
+    if (corr->_satCodeBias._bias.size()) {
+      t_satCodeBias satCodeBias(corr->_satCodeBias);
       satCodeBias._staID = "INTERNAL";
       satCodeBiasList.push_back(satCodeBias);
@@ -1191,5 +1185,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);
@@ -1448,9 +1442,9 @@
       if (meanRao.find(prn) == meanRao.end()) {
         meanRao[prn].ReSize(4);
-        meanRao[prn].Rows(1,3) = corr->_orbCorr->_xr;
+        meanRao[prn].Rows(1,3) = corr->_orbCorr._xr;
         meanRao[prn](4)        = 1;
       }
       else {
-        meanRao[prn].Rows(1,3) += corr->_orbCorr->_xr;
+        meanRao[prn].Rows(1,3) += corr->_orbCorr._xr;
         meanRao[prn](4)        += 1;
       }
@@ -1474,5 +1468,5 @@
         meanRao[prn](4) = 0;
       }
-      corr->_diffRao = corr->_orbCorr->_xr - meanRao[prn].Rows(1,3);
+      corr->_diffRao = corr->_orbCorr._xr - meanRao[prn].Rows(1,3);
       if (maxDiff.find(prn) == maxDiff.end()) {
         maxDiff[prn] = corr;
Index: /trunk/BNC/src/combination/bnccomb.h
===================================================================
--- /trunk/BNC/src/combination/bnccomb.h	(revision 10215)
+++ /trunk/BNC/src/combination/bnccomb.h	(revision 10216)
@@ -99,7 +99,4 @@
     cmbCorr() {
       _eph                        = 0;
-      _orbCorr                    = 0;
-      _clkCorr                    = 0;
-      _satCodeBias                = 0;
       _iod                        = 0;
       _dClkResult                 = 0.0;
@@ -112,7 +109,7 @@
     unsigned long  _iod;
     t_eph*         _eph;
-    t_orbCorr*      _orbCorr;
-    t_clkCorr*      _clkCorr;
-    t_satCodeBias* _satCodeBias;
+    t_orbCorr      _orbCorr;
+    t_clkCorr      _clkCorr;
+    t_satCodeBias  _satCodeBias;
     QString        _acName;
     double         _satCodeBiasIF;
@@ -248,5 +245,4 @@
   bncTime                                    _lastClkCorrTime;
   bncTime                                    _resTime;
-  QMap<char, QVector<cmbParam*>>             _params;
   QMap<char, cmbEpoch>                       _buffer;
   bncRtnetDecoder*                           _rtnetDecoder;
@@ -256,16 +252,17 @@
   bncBiasSnx*                                _bsx;
   double                                     _MAXRES;
+  e_method                                   _method;
+  int                                        _cmbSampl;
+  int                                        _ms;
   QMap<char, QString>                        _masterOrbitAC;
   QMap<char, unsigned>                       _masterMissingEpochs;
   QMap<char, bool>                           _masterIsAPC;
-  e_method                                   _method;
-  int                                        _cmbSampl;
-  int                                        _ms;
   QString                                    _cmbRefAttributes;
-  QMap<QString, QMap<t_prn, t_orbCorr*> >     _orbCorrections;
-  QMap<QString, QMap<t_prn, t_satCodeBias*> > _satCodeBiases;
+  QMap<char, QVector<cmbParam*>>              _params;
+  QMap<QString, QMap<t_prn, t_orbCorr> >     _orbCorrections;
+  QMap<QString, QMap<t_prn, t_satCodeBias> > _satCodeBiases;
+  QMap<char, unsigned>                       _cmbSysPrn;
   bncEphUser                                 _ephUser;
   SsrCorr*                                   _ssrCorr;
-  QMap<char, unsigned>                       _cmbSysPrn;
   bool                                       _useGps;
   bool                                       _useGlo;
