Ticket #6157: patch_2470

File patch_2470, 1.4 KB (added by Gesner Passos, 8 years ago)

This patch should solve the memory leak.

Line 
1diff --git a/Code/Mantid/MantidQt/CustomInterfaces/src/SANSDiagnostics.cpp b/Code/Mantid/MantidQt/CustomInterfaces/src/SANSDiagnostics.cpp
2index 4f7940d..56df411 100644
3--- a/Code/Mantid/MantidQt/CustomInterfaces/src/SANSDiagnostics.cpp
4+++ b/Code/Mantid/MantidQt/CustomInterfaces/src/SANSDiagnostics.cpp
5@@ -456,7 +456,7 @@ namespace MantidQt
6             min_spec_index = aux;
7         }
8       }
9-
10+         delete map; // release the memory - memory leak
11       if ( min_spec_index == ULONG_MAX || max_spec_index == 0){
12         g_log.error()<<"Error : The instrument does not have data associated to the RectangularDetector " << rectDet->getDetectorName().toStdString()<<std::endl;
13       }