comparison 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
comparison
equal deleted inserted replaced
976:3abc47e051c8 977:262a0244e9b2
422 IOracle& oracle, 422 IOracle& oracle,
423 IObservable& oracleObservable) : 423 IObservable& oracleObservable) :
424 IObserver(oracleObservable.GetBroker()), 424 IObserver(oracleObservable.GetBroker()),
425 IObservable(oracleObservable.GetBroker()), 425 IObservable(oracleObservable.GetBroker()),
426 oracle_(oracle), 426 oracle_(oracle),
427 oracleObservable_(oracleObservable),
427 active_(false), 428 active_(false),
428 simultaneousDownloads_(4), 429 simultaneousDownloads_(4),
429 volume_(volume), 430 volume_(volume),
430 sorter_(new BasicFetchingItemsSorter::Factory), 431 sorter_(new BasicFetchingItemsSorter::Factory),
431 volumeImageReadyInHighQuality_(false) 432 volumeImageReadyInHighQuality_(false)
443 (*this, &OrthancSeriesVolumeProgressiveLoader::LoadJpegSliceContent)); 444 (*this, &OrthancSeriesVolumeProgressiveLoader::LoadJpegSliceContent));
444 } 445 }
445 446
446 OrthancSeriesVolumeProgressiveLoader::~OrthancSeriesVolumeProgressiveLoader() 447 OrthancSeriesVolumeProgressiveLoader::~OrthancSeriesVolumeProgressiveLoader()
447 { 448 {
449 oracleObservable_.Unregister(this);
448 LOG(TRACE) << "OrthancSeriesVolumeProgressiveLoader::~OrthancSeriesVolumeProgressiveLoader()"; 450 LOG(TRACE) << "OrthancSeriesVolumeProgressiveLoader::~OrthancSeriesVolumeProgressiveLoader()";
449 } 451 }
450 452
451 void OrthancSeriesVolumeProgressiveLoader::SetSimultaneousDownloads(unsigned int count) 453 void OrthancSeriesVolumeProgressiveLoader::SetSimultaneousDownloads(unsigned int count)
452 { 454 {