Skip to content

Local/global reference management functions#11

Open
ktoso wants to merge 4 commits intoswiftlang:mainfrom
ktoso:ref-management
Open

Local/global reference management functions#11
ktoso wants to merge 4 commits intoswiftlang:mainfrom
ktoso:ref-management

Conversation

@ktoso
Copy link
Collaborator

@ktoso ktoso commented Mar 16, 2026

For discussion about having helpers for frame management.

We probably should not "wrap" all interface APIs... however when there si a chance to make usage safer like here about what if the push failed by making a with... method I think it is probably worth it.

Open to opinions though cc @marcprux @madsodgaard

Context is swiftlang/swift-java#616

Copy link

@madsodgaard madsodgaard left a comment

Choose a reason for hiding this comment

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

I think this is a great addition.

Only thing I think we should do, is make sure we clear the OOM exception that PushLocalFrame might throw, and throw a Swift error instead.

The alternative is moving this to SwiftJava and using the translatingJNIExceptions helper.

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