Skip to content

Various improvements in lifetime management

Andy Salnikov requested to merge salnikov/coral:tickets/CORALCOOL-1212 into master

Most of the changes are in CORAL_SERVER, though there is one small fix in MySQLAccess. CORAL_SERVER has many changes to modernize C++ and better track objects on heap:

  • all auto_ptr were replaced with unique_ptr
  • many ownership-tracking bare pointers were replaces with unique_ptr too
  • remaining bare pointers should mean non-owning pointers
  • use override keyword where appropriate
  • few memory leaks were fixed

I tried to apply these policies consistently to all CORAL_SERVER code, but I'm sure there still things to improve.

MySQLAccess fix is trivial, it's needed to avoid memory leaks when exceptions are generated by SQL (this happens e.g. in nightly tests).

All changes have been tested, we are actually running CoralServer for nightly tests (on atlas-coral-01) from this branch.

Merge request reports

Loading