# HG changeset patch # User Sebastien Jodogne # Date 1592489933 -7200 # Node ID 5e3cfe87a8739197e06797d0a125b447c5c30872 # Parent fab6c6e795a330d4e4bbeb41bbb1be35cc108210 SortedFrames::Clear() diff -r fab6c6e795a3 -r 5e3cfe87a873 Framework/Toolbox/SortedFrames.cpp --- a/Framework/Toolbox/SortedFrames.cpp Thu Jun 18 16:01:00 2020 +0200 +++ b/Framework/Toolbox/SortedFrames.cpp Thu Jun 18 16:18:53 2020 +0200 @@ -123,13 +123,18 @@ } - SortedFrames::~SortedFrames() + void SortedFrames::Clear() { for (size_t i = 0; i < instances_.size(); i++) { assert(instances_[i] != NULL); delete instances_[i]; } + + studyInstanceUid_.clear(); + seriesInstanceUid_.clear(); + frames_.clear(); + sorted_ = true; } diff -r fab6c6e795a3 -r 5e3cfe87a873 Framework/Toolbox/SortedFrames.h --- a/Framework/Toolbox/SortedFrames.h Thu Jun 18 16:01:00 2020 +0200 +++ b/Framework/Toolbox/SortedFrames.h Thu Jun 18 16:18:53 2020 +0200 @@ -113,7 +113,12 @@ { } - ~SortedFrames(); + ~SortedFrames() + { + Clear(); + } + + void Clear(); const std::string& GetStudyInstanceUid() const {