Commits

prevent leak of LogIO objects in agentflagger, CAS-12489

gcwrap/tools/flagging/agentflagger_cmpt.cc

Modified
25 25 #include <measures/Measures/MeasIERS.h>
26 26
27 27
28 28 using namespace std;
29 29 using namespace casacore;
30 30 using namespace casa;
31 31
32 32 using namespace casacore;
33 33 namespace casac {
34 34
35 -agentflagger::agentflagger()
35 +agentflagger::agentflagger(): logger_p(new LogIO(LogOrigin("agentflagger","",WHERE)))
36 36 {
37 37 try
38 38 {
39 - logger_p = new LogIO(LogOrigin("agentflagger","",WHERE));
40 39 agentflagger_p = new AgentFlagger();
41 40
42 41 } catch (AipsError x) {
43 42 *logger_p << LogIO::SEVERE << "Exception Reported: " << x.getMesg() << LogIO::POST;
44 43 RETHROW(x);
45 44 }
46 45
47 46 }
48 47
49 48 agentflagger::~agentflagger()

Everything looks good. We'll let you know here if there's anything you should know about.

Add shortcut