Draft: AthenaServices: Avoid leaking IOpaqueAddresses in AthenaOutputStreamTool

In the trigger step of an MC21a ttbar full-chain job valgrind complains that we're leaking IOpaqueAddress es:

41,222 (34,048 direct, 7,174 indirect) bytes in 133 blocks are definitely lost in loss record 96,303 of 97,826
  at 0x4033F11: operator new(unsigned long) (vg_replace_malloc.c:422)
  by 0x47D556EB: AthenaOutputStreamTool::streamObjects(std::vector<DataObject*, std::allocator<DataObject*> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) (AthenaOutputStreamTool.cxx:448)
  by 0x47D3E838: AthenaOutputStream::write() (AthenaOutputStream.cxx:641)
  by 0x47D32FAE: AthenaOutputStream::execute() (AthenaOutputStream.cxx:532)
  by 0x2F9637C6: Gaudi::Algorithm::sysExecute(EventContext const&) (Algorithm.cpp:366)

We are doing a by-hand cleanup of the IOpaqueAddress es but we might be conditionally skipping some of them. With this MR we are dropping the by-hand memory management of these guys in favor of unique pointers.

This should be a benign change but you never know. Therefore, I'll run the full suit of tests, just in case.

Merge request reports