ahupowerdns / metronome

GNU General Public License v2.0
50 stars 22 forks source link

Wrap file descriptors and dynamically allocated memory to use RAII #76

Closed rgacogne closed 4 years ago

rgacogne commented 4 years ago

This PR wraps file descriptors (sockets, file and directory descriptors) and dynamically allocated memory in objects and smart pointers to prevent any leak. I did not see any, to be clear, but I believe this might prevent mistakes at a later time.

This PR is based on top of #75 to prevent a conflict later, but I can rebase it if needed.