A couple of memory leaks
Just a small todo; it appears that these are not severe:
Steps to reproduce:
build_adis$ cmake -DCMAKE_BUILD_TYPE=Debug -DCMAKE_CXX_FLAGS_DEBUG="-fsanitize=address -fsanitize=undefined" ../adis
build_adis$ make -j `nproc`
build_adis$ ctest -V
8: =================================================================
8: ==14267==ERROR: LeakSanitizer: detected memory leaks
8:
8: Direct leak of 40 byte(s) in 1 object(s) allocated from:
8: #0 0x7f078e35f458 in operator new(unsigned long) (/usr/lib/x86_64-linux-gnu/libasan.so.4+0xe0458)
8: #1 0x7f078d5859ec in __gnu_cxx::new_allocator<adis::metadata::FieldInformation>::allocate(unsigned long, void const*) (/home/4nt/build_adis/adis/libadis.so+0x9f39ec)
8: #2 0x7f078d57e4da in std::allocator_traits<std::allocator<adis::metadata::FieldInformation> >::allocate(std::allocator<adis::metadata::FieldInformation>&, unsigned long) (/home/4nt/build_adis/adis/libadis.so+0x9ec4da)
8: #3 0x7f078d578d6c in std::_Vector_base<adis::metadata::FieldInformation, std::allocator<adis::metadata::FieldInformation> >::_M_allocate(unsigned long) (/home/4nt/build_adis/adis/libadis.so+0x9e6d6c)
8: #4 0x7f078d57e8c2 in std::_Vector_base<adis::metadata::FieldInformation, std::allocator<adis::metadata::FieldInformation> >::_M_create_storage(unsigned long) (/home/4nt/build_adis/adis/libadis.so+0x9ec8c2)
8: #5 0x7f078d5790ce in std::_Vector_base<adis::metadata::FieldInformation, std::allocator<adis::metadata::FieldInformation> >::_Vector_base(unsigned long, std::allocator<adis::metadata::FieldInformation> const&) (/home/4nt/build_adis/adis/libadis.so+0x9e70ce)
8: #6 0x7f078d570834 in std::vector<adis::metadata::FieldInformation, std::allocator<adis::metadata::FieldInformation> >::vector(std::vector<adis::metadata::FieldInformation, std::allocator<adis::metadata::FieldInformation> > const&) (/home/4nt/build_adis/adis/libadis.so+0x9de834)
8: #7 0x7f078d567e38 in adis::metadata::Vector<adis::metadata::FieldInformation>::Vector(adis::metadata::Vector<adis::metadata::FieldInformation> const&) (/home/4nt/build_adis/adis/libadis.so+0x9d5e38)
8: #8 0x7f078d567f61 in void adis::metadata::MetaData::Set<adis::metadata::Vector<adis::metadata::FieldInformation> >(unsigned long, adis::metadata::Vector<adis::metadata::FieldInformation> const&) (/home/4nt/build_adis/adis/libadis.so+0x9d5f61)
8: #9 0x7f078d55ff34 in adis::io::DataSetReader::DataSetReaderImpl::ReadMetaData(std::unordered_map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::hash<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::equal_to<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > > const&) (/home/4nt/build_adis/adis/libadis.so+0x9cdf34)
8: #10 0x7f078d557198 in adis::io::DataSetReader::ReadMetaData(std::unordered_map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::hash<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::equal_to<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > > const&) (/home/4nt/build_adis/adis/libadis.so+0x9c5198)
8: #11 0x55d87ee5c783 in main (/home/4nt/build_adis/tests/test-rectilinear+0x26783)
8: #12 0x7f078a899b96 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x21b96)
8:
8: SUMMARY: AddressSanitizer: 40 byte(s) leaked in 1 allocation(s).
8/8 Test #8: test-rectilinear ..................***Failed 0.11 sec