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

Fix mismatched delete/free in OSQPModel #398

Conversation

Jack-ReframeSystems
Copy link
Contributor

Previously we were calling delete on the CSC matrix pointer but its malloc'd, we should be calling "free" instead. We also don't want to free any of the subfield (using something like csc_spfree) since we manage the individual fields in OSQPModel vectors.

Copy link
Contributor

@Levi-Armstrong Levi-Armstrong left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, Could can you run clang format? There is a script .run-clang-format that you may run.

@Jack-ReframeSystems
Copy link
Contributor Author

Jack-ReframeSystems commented Apr 12, 2024

LGTM, Could can you run clang format? There is a script .run-clang-format that you may run.

Do you mind if I change the clang format script to use a newer version of clang? Its using clang 8 at the moment but I can't get that on Ubuntu Jammy, I would like to change it to use the clang default version on the system.

I'll update the PR with this and you can let me know if you have concerns with this.

Also, happy to break that into a different PR if you want me to.

@@ -1,2 +1,2 @@
#!/bin/bash
find . -type f -regex '.*\.\(cpp\|hpp\|cc\|cxx\|h\|hxx\)' -exec clang-format-8 -style=file -i {} \;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just for consistency please revert change.

@Levi-Armstrong
Copy link
Contributor

replaced by #399

@rjoomen
Copy link
Contributor

rjoomen commented Apr 30, 2024

Good catch!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants