Mercurial > hg > orthanc-stone
changeset 935:401808e7ff2e toa2019072901
Added traces in LoaderCache objects dtors + fuse to prevent dead weak ptrs to be calleds in VisitWdigets (in GuiAdapter.h)
author | Benjamin Golinvaux <bgo@osimis.io> |
---|---|
date | Mon, 29 Jul 2019 15:39:11 +0200 |
parents | 094d10ed7ec2 |
children | 775ebd43bd3b |
files | Applications/Generic/GuiAdapter.h Framework/Loaders/DicomStructureSetLoader.cpp Framework/Loaders/DicomStructureSetLoader.h Framework/Loaders/OrthancMultiframeVolumeLoader.cpp Framework/Loaders/OrthancMultiframeVolumeLoader.h Framework/Loaders/OrthancSeriesVolumeProgressiveLoader.cpp Framework/Loaders/OrthancSeriesVolumeProgressiveLoader.h Framework/Volumes/DicomVolumeImageMPRSlicer.cpp Framework/Volumes/DicomVolumeImageMPRSlicer.h |
diffstat | 9 files changed, 33 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/Applications/Generic/GuiAdapter.h Mon Jul 29 13:46:29 2019 +0200 +++ b/Applications/Generic/GuiAdapter.h Mon Jul 29 15:39:11 2019 +0200 @@ -364,7 +364,12 @@ for (size_t i = 0; i < widgets_.size(); i++) { boost::shared_ptr<IGuiAdapterWidget> widget = widgets_[i].lock(); - func(widget); + + // TODO: we need to clean widgets! + if (widget.get() != NULL) + { + func(widget); + } } } };
--- a/Framework/Loaders/DicomStructureSetLoader.cpp Mon Jul 29 13:46:29 2019 +0200 +++ b/Framework/Loaders/DicomStructureSetLoader.cpp Mon Jul 29 15:39:11 2019 +0200 @@ -233,6 +233,11 @@ } + DicomStructureSetLoader::~DicomStructureSetLoader() + { + LOG(TRACE) << "DicomStructureSetLoader::~DicomStructureSetLoader()"; + } + void DicomStructureSetLoader::LoadInstance(const std::string& instanceId) { Start();
--- a/Framework/Loaders/DicomStructureSetLoader.h Mon Jul 29 13:46:29 2019 +0200 +++ b/Framework/Loaders/DicomStructureSetLoader.h Mon Jul 29 15:39:11 2019 +0200 @@ -49,6 +49,8 @@ DicomStructureSetLoader(IOracle& oracle, IObservable& oracleObservable); + ~DicomStructureSetLoader(); + void LoadInstance(const std::string& instanceId); virtual IExtractedSlice* ExtractSlice(const CoordinateSystem3D& cuttingPlane);
--- a/Framework/Loaders/OrthancMultiframeVolumeLoader.cpp Mon Jul 29 13:46:29 2019 +0200 +++ b/Framework/Loaders/OrthancMultiframeVolumeLoader.cpp Mon Jul 29 15:39:11 2019 +0200 @@ -333,6 +333,10 @@ } } + OrthancMultiframeVolumeLoader::~OrthancMultiframeVolumeLoader() + { + LOG(TRACE) << "OrthancMultiframeVolumeLoader::~OrthancMultiframeVolumeLoader()"; + } void OrthancMultiframeVolumeLoader::LoadInstance(const std::string& instanceId) {
--- a/Framework/Loaders/OrthancMultiframeVolumeLoader.h Mon Jul 29 13:46:29 2019 +0200 +++ b/Framework/Loaders/OrthancMultiframeVolumeLoader.h Mon Jul 29 15:39:11 2019 +0200 @@ -59,6 +59,8 @@ OrthancMultiframeVolumeLoader(boost::shared_ptr<DicomVolumeImage> volume, IOracle& oracle, IObservable& oracleObservable); + + virtual ~OrthancMultiframeVolumeLoader(); void LoadInstance(const std::string& instanceId); };
--- a/Framework/Loaders/OrthancSeriesVolumeProgressiveLoader.cpp Mon Jul 29 13:46:29 2019 +0200 +++ b/Framework/Loaders/OrthancSeriesVolumeProgressiveLoader.cpp Mon Jul 29 15:39:11 2019 +0200 @@ -430,6 +430,10 @@ (*this, &OrthancSeriesVolumeProgressiveLoader::LoadJpegSliceContent)); } + OrthancSeriesVolumeProgressiveLoader::~OrthancSeriesVolumeProgressiveLoader() + { + LOG(TRACE) << "OrthancSeriesVolumeProgressiveLoader::~OrthancSeriesVolumeProgressiveLoader()"; + } void OrthancSeriesVolumeProgressiveLoader::SetSimultaneousDownloads(unsigned int count) {
--- a/Framework/Loaders/OrthancSeriesVolumeProgressiveLoader.h Mon Jul 29 13:46:29 2019 +0200 +++ b/Framework/Loaders/OrthancSeriesVolumeProgressiveLoader.h Mon Jul 29 15:39:11 2019 +0200 @@ -119,6 +119,8 @@ IOracle& oracle, IObservable& oracleObservable); + virtual ~OrthancSeriesVolumeProgressiveLoader(); + void SetSimultaneousDownloads(unsigned int count); void LoadSeries(const std::string& seriesId);
--- a/Framework/Volumes/DicomVolumeImageMPRSlicer.cpp Mon Jul 29 13:46:29 2019 +0200 +++ b/Framework/Volumes/DicomVolumeImageMPRSlicer.cpp Mon Jul 29 15:39:11 2019 +0200 @@ -100,7 +100,12 @@ } - IVolumeSlicer::IExtractedSlice* + DicomVolumeImageMPRSlicer::~DicomVolumeImageMPRSlicer() + { + LOG(TRACE) << "DicomVolumeImageMPRSlicer::~DicomVolumeImageMPRSlicer()"; + } + + IVolumeSlicer::IExtractedSlice* DicomVolumeImageMPRSlicer::ExtractSlice(const CoordinateSystem3D& cuttingPlane) { if (volume_->HasGeometry())
--- a/Framework/Volumes/DicomVolumeImageMPRSlicer.h Mon Jul 29 13:46:29 2019 +0200 +++ b/Framework/Volumes/DicomVolumeImageMPRSlicer.h Mon Jul 29 15:39:11 2019 +0200 @@ -89,6 +89,8 @@ { } + virtual ~DicomVolumeImageMPRSlicer(); + virtual IExtractedSlice* ExtractSlice(const CoordinateSystem3D& cuttingPlane) ORTHANC_OVERRIDE; }; }