Skip to content
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

Merged
merged 22 commits into from
Jul 24, 2024
Merged

Remove dynamic manually allocated memory #2273

merged 22 commits into from
Jul 24, 2024

Conversation

payetvin
Copy link
Contributor

No description provided.

@pull-request-size pull-request-size bot added size/M and removed size/S labels Jul 18, 2024
@pull-request-size pull-request-size bot added size/L and removed size/M labels Jul 18, 2024
@payetvin payetvin marked this pull request as ready for review July 19, 2024 08:27
Copy link
Member

@flomnes flomnes left a 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

JasonMarechal25 and others added 3 commits July 22, 2024 15:10
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
Copy link

@payetvin payetvin merged commit cb270ed into develop Jul 24, 2024
3 of 7 checks passed
@payetvin payetvin deleted the feature/remove-new branch July 24, 2024 07:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants