Index: trunk/BNC/src/upload/bncrtnetuploadcaster.cpp
===================================================================
--- trunk/BNC/src/upload/bncrtnetuploadcaster.cpp	(revision 11140)
+++ trunk/BNC/src/upload/bncrtnetuploadcaster.cpp	(revision 11179)
@@ -287,4 +287,15 @@
     delete _usedEph;
     delete _ssrCorr;
+}
+
+// Close the SP3, clock RINEX and Bias-SINEX files: done here, since the
+// destructor may run only after the end of the event loop (deleteLater),
+// i.e. not at all at the end of BNC
+////////////////////////////////////////////////////////////////////////////
+void bncRtnetUploadCaster::closeFiles() {
+  QMutexLocker locker(&_mutex);
+  delete _rnx; _rnx = 0;
+  delete _sp3; _sp3 = 0;
+  delete _bsx; _bsx = 0;
 }
 
