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

Kristupas/update uniffi.0.28.0 #86

Draft
wants to merge 8 commits into
base: main
Choose a base branch
from
Draft

Conversation

arg0d
Copy link
Collaborator

@arg0d arg0d commented Aug 2, 2024

No description provided.

arg0d added 8 commits June 21, 2024 16:22
SafeHandle is used to manage ownership of the Rust object. When
SafeHandle goes out of scope, the underlying Rust reference is
decremented. Method calls and lowering increment ("clone") object
reference, and Rust is responsible for decrementing the reference. This
means, it's not necessary to use SafeHandle directly for method calls
and lowering, since Rust will take care of decrementing the reference.

However, it's still necessary to use SafeHandle for "cloning" the
reference, since CG may choose to collect the object itself and run the
finalizer, in turn decrementing Rust reference and causing
use-after-free during "clone" native call. (See SafeHandle
documentation).
@RCasatta
Copy link

FWIW I am using this branch but I had to fix the namespace with this to compile and use the resulting csharp file

@arg0d
Copy link
Collaborator Author

arg0d commented Oct 21, 2024

Hey, this is a draft and not finished, I would recommend not using it yet.

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.

2 participants