-
Notifications
You must be signed in to change notification settings - Fork 43
Adding more smart pointers #294
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
… functions with pointer arguments, and fixed a memory leak.
…to use smart pointers in DMD classes.
ckendrick
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a good set of changes to help modernize the code. I had a few very minor comments, but otherwise this looks good to me.
dreamer2368
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for such an extensive work and all the miscellaneous code cleanup. I left some comments here and there. But they are more of questions out of curiosity, me wondering about the rationale behind your choice of smart/raw pointers.
This PR has breaking changes to the API, requiring updates to any application using libROM.
The goal is to replace raw pointers by smart pointers in the library. This has also been done in some examples, but not all, for the purpose of testing the library for memory leaks. The following examples have been run with
valgrindsuccessfully:mixed_nonlinear_diffusionparametric_tw_csvparametric_heat_conductionde_dg_advection_greedypoisson_local_rom_greedyThe use of smart pointers has fixed memory issues in the library and the examples. It has also simplified many things and reduced the number of lines of code significantly, making libROM not only safer but also more readable.