-
Notifications
You must be signed in to change notification settings - Fork 47
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
Ceed*Get[CeedObject] Needs Destroy #1702
Conversation
dc369e7
to
1792040
Compare
7910856
to
dc3318a
Compare
Is MFEM going to need updates to track this? |
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.
Do the language bindings (Python, Julia, and Rust) need updates for these?
Surprisingly, the updates MFEM needs for v0.13 are pretty minimal. I've got a branch open, and I don't think this PR will add any new changes. But Ratel and HONEE will need a couple of changes |
let mut ptr_coarse = std::ptr::null_mut(); | ||
let mut ptr_prolong = std::ptr::null_mut(); | ||
let mut ptr_restrict = std::ptr::null_mut(); | ||
let ierr = unsafe { | ||
self.op_core.check_error(unsafe { |
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.
In the future (definitely a different PR), this could be let (op_coarse, op_prolong, op_restrict) = ceed.op_core.check_error_with_3(|ptr_coarse, ptr_prolong, ptr_restrict| unsafe { ... })?;
.
Note that Operator::from_raw
should be unsafe
because it will dereference a raw pointer. Just noticed that while browsing (also not for this PR, and I'm not trying to snipe you into working on it).
@jrwrigh this is relevant to HONEE - you'll want a couple of Destroys probably |
Requiring Ceed objects returned from
Ceed*Get[CeedObject]
to be destroyedCeed*GetCeed
CeedGetParent
CeedGetDelegate
CeedGetObjectFallback
CeedGetOperatorFallbackCeed
CeedQFunctionGetContext
CeedOperatorGetQFunction
CeedOperatorGetFallbackParentCeed