Skip to content
Snippets Groups Projects
  1. Jan 05, 2021
  2. Jan 04, 2021
  3. Dec 22, 2020
  4. Dec 21, 2020
  5. Dec 18, 2020
  6. Dec 17, 2020
  7. Dec 16, 2020
  8. Dec 15, 2020
  9. Dec 14, 2020
  10. Dec 12, 2020
  11. Dec 11, 2020
  12. Dec 10, 2020
    • Christos Anastopoulos's avatar
    • scott snyder's avatar
      TrkGeometry: Fix memory leaks · 1d7adb5a
      scott snyder authored
      CompactBinnedArray maps bins in some coordinates to a vector of pointers
      to objects.  It does not own this objects.
      
      BinnedMaterial uses CompactBinnedArray, with the object in question
      being a pair<> object.
      
      When a BinnedMaterial is constructed, it takes a vector of pointers
      to these pairs.  It does not take ownership of this pairs, but just
      passes them to the CompactBinnedArray.
      
      The callers of BinnedMaterial also do not take ownership of these pairs.
      So they are presently leaked.
      
      Further, BinnedMaterial can't just delete them, because these pairs
      get shared between multiple BinnedMaterial instances.
      
      We restructure like this.
      
      BinnnedMaterial now gets a vector of pairs, which it saves as a member.
      The CompactBinnedArray is then constructed to that it points at the
      pairs in this vector.  BinnedMaterial now effectively owns the pairs.
      These are now duplicated in each BinnedMaterial, but that should be ok.
      We also need to extend CompactBinnedArray so that we can give it
      a new vector of object pointers when it is cloned.
      
      cf ATLASRECTS-5831.
      1d7adb5a
    • scott snyder's avatar
      TrkDetDescrUtils: Fix memory leaks · 00ae1f03
      scott snyder authored
      CompactBinnedArray maps bins in some coordinates to a vector of pointers
      to objects.  It does not own this objects.
      
      BinnedMaterial uses CompactBinnedArray, with the object in question
      being a pair<> object.
      
      When a BinnedMaterial is constructed, it takes a vector of pointers
      to these pairs.  It does not take ownership of this pairs, but just
      passes them to the CompactBinnedArray.
      
      The callers of BinnedMaterial also do not take ownership of these pairs.
      So they are presently leaked.
      
      Further, BinnedMaterial can't just delete them, because these pairs
      get shared between multiple BinnedMaterial instances.
      
      We restructure like this.
      
      BinnnedMaterial now gets a vector of pairs, which it saves as a member.
      The CompactBinnedArray is then constructed to that it points at the
      pairs in this vector.  BinnedMaterial now effectively owns the pairs.
      These are now duplicated in each BinnedMaterial, but that should be ok.
      We also need to extend CompactBinnedArray so that we can give it
      a new vector of object pointers when it is cloned.
      
      cf ATLASRECTS-5831.
      00ae1f03
  13. Dec 09, 2020
  14. Dec 08, 2020
Loading