- Timestamp:
- Mar 30, 2011, 7:02:18 PM (14 years ago)
- Location:
- trunk/BNC/upload
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/BNC/upload/bncrtnetdecoder.cpp
r3206 r3207 72 72 bncRtnetDecoder::~bncRtnetDecoder() { 73 73 for (int ic = 0; ic < _casters.size(); ic++) { 74 delete _casters[ic];74 _casters[ic]->deleteSafely(); 75 75 } 76 76 } -
trunk/BNC/upload/bncuploadcaster.cpp
r3206 r3207 48 48 _outSocket = 0; 49 49 _sOpenTrial = 0; 50 51 _isToBeDeleted = false; 50 52 51 53 // Raw Output … … 186 188 } 187 189 190 // Safe Desctructor 191 //////////////////////////////////////////////////////////////////////////// 192 void bncUploadCaster::deleteSafely() { 193 QMutexLocker locker(&_mutex); 194 _isToBeDeleted = true; 195 } 196 188 197 // Destructor 189 198 //////////////////////////////////////////////////////////////////////////// … … 337 346 338 347 QMutexLocker locker(&_mutex); 348 349 // Safely stop and delete 350 // ---------------------- 351 if (_isToBeDeleted) { 352 QThread::quit(); 353 deleteLater(); 354 return; 355 } 339 356 340 357 // Prepare list of lines with satellite positions in SP3-like format -
trunk/BNC/upload/bncuploadcaster.h
r3206 r3207 20 20 const QString& rnxFileName, 21 21 const QString& outFileName); 22 protected: 22 23 virtual ~bncUploadCaster(); 24 public: 25 void deleteSafely(); 23 26 virtual void run(); 24 27 void decodeRtnetStream(char* buffer, int bufLen, … … 40 43 41 44 QMap<QString, t_eph*>* _ephMap; 45 bool _isToBeDeleted; 42 46 QMutex _mutex; 43 47 QString _rtnetStreamBuffer;
Note:
See TracChangeset
for help on using the changeset viewer.