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 passing strings options to ScsSettings #253

Merged
merged 6 commits into from
Mar 20, 2022
Merged

Conversation

kalmarek
Copy link
Collaborator

No description provided.

@kalmarek kalmarek requested a review from odow March 17, 2022 22:24
Copy link
Member

@odow odow left a comment

Choose a reason for hiding this comment

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

How's this? I added a GC.@preserve to make sure the result of cconvert doesn't get freed during the setproperty!.

src/c_wrapper.jl Outdated Show resolved Hide resolved
We keep values away from GC by @preserving model, hence scs structs must
point to actual values stored there. A non-`String` value in
model.option allocates a `String` when `Base.cconvert`ing which would
need to be GC.@preserved separately from `model`
src/c_wrapper.jl Outdated Show resolved Hide resolved
@kalmarek kalmarek merged commit e882acb into master Mar 20, 2022
@kalmarek kalmarek deleted the fix/string_options branch March 20, 2022 23:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants