-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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).
- Loading branch information
Showing
6 changed files
with
39 additions
and
35 deletions.
There are no files selected for viewing
Submodule uniffi-rs
updated
40 files
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters