Skip to content

ATLASRECTS-5609 MaterialEffectUpdator: Avoid aliasing of input to output, always return a new ptr

  • Modify the MaterialEffectUpdator interface to be similar to propagators other updators etc.
  • Basically instead of returning const TrackParameters*. That most of the times are owned and need to be deleted by the caller. But sometimes are not as they are the same/ alias the input ...
  • Return TrackParameters* that are to be owned by the caller always.
  • So we get back new ones we own, or a nullptr (similar to Propagators or other updators for this matter)

Mentioning @amorley and @sswatman

For now the clients should work as such.

As further step for this (and not only this) we should make the return std::unique_ptr<TrackParameters> and at large move to unique_ptr

Edited by Christos Anastopoulos

Merge request reports

Loading