diff Framework/Loaders/OrthancSeriesVolumeProgressiveLoader.cpp @ 977:262a0244e9b2 toa2019090201

Added missing Unregister for objects that register by the broker + logs + guard in FetchContext
author Benjamin Golinvaux <bgo@osimis.io>
date Mon, 02 Sep 2019 17:29:26 +0200
parents a7351ad54960
children e713f1a99861 2d8ab34c8c91
line wrap: on
line diff
--- a/Framework/Loaders/OrthancSeriesVolumeProgressiveLoader.cpp	Sat Aug 31 13:50:11 2019 +0200
+++ b/Framework/Loaders/OrthancSeriesVolumeProgressiveLoader.cpp	Mon Sep 02 17:29:26 2019 +0200
@@ -424,6 +424,7 @@
     IObserver(oracleObservable.GetBroker()),
     IObservable(oracleObservable.GetBroker()),
     oracle_(oracle),
+    oracleObservable_(oracleObservable),
     active_(false),
     simultaneousDownloads_(4),
     volume_(volume),
@@ -445,6 +446,7 @@
 
   OrthancSeriesVolumeProgressiveLoader::~OrthancSeriesVolumeProgressiveLoader()
   {
+    oracleObservable_.Unregister(this);
     LOG(TRACE) << "OrthancSeriesVolumeProgressiveLoader::~OrthancSeriesVolumeProgressiveLoader()";
   }