-
Notifications
You must be signed in to change notification settings - Fork 24
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
Remove dynamic manually allocated memory #2273
Conversation
This reverts commit 065acfb.
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.
Correlation::retrieveMontlyMatrixArray
is unused, consider removing it. It would be a good thing since std::unique_ptr::get
is "dangerous", it can easily lead to dangling pointers
auto ptr = std::make_unique<Cow>();
Cow* cow = ptr.get();
// ptr goes out of scope, is deleted
cow->moo(); // segfault
We create a shared_ptr on the stack, stock the raw pointer in a vector then exit the scop. At this point the pointer is not valid anymore
Quality Gate passedIssues Measures |
No description provided.