Changeset 7888 in ntrip for trunk


Ignore:
Timestamp:
Apr 26, 2016, 3:28:16 PM (3 years ago)
Author:
stuerze
Message:

a try to fix a persistent memory leak

Location:
trunk/BNC/src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/BNC/src/bncgetthread.cpp

    r7859 r7888  
    641641#endif
    642642    }
    643 
    644     delete _query;
     643    if (_query) {
     644      delete _query;
     645    }
    645646    if      (_ntripVersion == "U") {
    646647      _query = new bncNetQueryUdp();
  • trunk/BNC/src/ephemeris.cpp

    r7639 r7888  
    3636////////////////////////////////////////////////////////////////////////////
    3737void t_eph::setOrbCorr(const t_orbCorr* orbCorr) {
    38   delete _orbCorr;
     38  if (_orbCorr) {
     39    delete _orbCorr;
     40    _orbCorr = 0;
     41  }
    3942  _orbCorr = new t_orbCorr(*orbCorr);
    4043}
     
    4346////////////////////////////////////////////////////////////////////////////
    4447void t_eph::setClkCorr(const t_clkCorr* clkCorr) {
    45   delete _clkCorr;
     48  if (_clkCorr) {
     49    delete _clkCorr;
     50    _clkCorr = 0;
     51  }
    4652  _clkCorr = new t_clkCorr(*clkCorr);
    4753}
Note: See TracChangeset for help on using the changeset viewer.