Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Sign in
S src
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 62
    • Issues 62
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
    • Iterations
  • Merge requests 4
    • Merge requests 4
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Operations
    • Operations
    • Incidents
    • Environments
  • Analytics
    • Analytics
    • CI/CD
    • Code Review
    • Issue
    • Repository
    • Value Stream
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Members
    • Members
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • OPAL
  • src
  • Issues
  • #547

Closed
Open
Created May 31, 2020 by kraus@krausDeveloper0 of 6 tasks completed0/6 tasks

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 pointer std::shared_ptr<T> is used should feature a typedef 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 Nov 05, 2022 by kraus
Assignee
Assign to
None
Milestone
None
Assign milestone
Time tracking