Replace all plain pointers with smart pointers
We should replace all plain pointers with smart pointers, either from std or from boost.
Some random notes
- Each class
T
for which a shared pointerstd::shared_ptr<T>
is used should feature atypedef std::shared_ptr<T> SP
. This reduces the amount of code we have to write. - Cyclic references have to be avoided using weak pointers.
ToDos
-
ElementBase *
->std::shared_ptr<ElementBase>
-
return type of Object::clone -
(almost) all occurrences of the keyword new
-
replace (occurrences of) Pointer
class -
replace pointers in Classic/Fields with smart pointers (#744 (closed)) -
replace plain pointers in Classic/AbsBeamline with smart pointers (#746)
Edited by kraus