SaaSHub helps you find the best software and product alternatives Learn more →
Swift-java Alternatives
Similar projects and alternatives to swift-java
-
-
SaaSHub
SaaSHub - Software Alternatives and Reviews. SaaSHub helps you find the best software and product alternatives
swift-java discussion
swift-java reviews and mentions
- Swift Java Interoperability Tools and Libraries
-
Swift/Java interoperability tools and libraries
> It makes me wonder how they are dealing with memory management when Java objects are being used from Swift
It uses Swift macros to add a `JavaObjectHolder` property to Swift types annotated with `@JavaClass`[0]. `JavaObjectHolder` is a Swift class that takes a global JNI reference to the Java object, and releases it when the holder is destroyed[1].
The result is that a codegen utility emits Swift structs that wrap the JNI values, and the JNI glue code for method invocation is applied at compile-time when the macros are expanded.
[0] https://github.com/swiftlang/swift-java/blob/e7d7a217e37d49b...
[1] https://github.com/swiftlang/swift-java/blob/main/Sources/Ja...
[2] https://github.com/swiftlang/swift-java/blob/main/Sources/Ja...
-
A note from our sponsor - SaaSHub
www.saashub.com | 15 Oct 2024
Stats
swiftlang/swift-java is an open source project licensed under Apache License 2.0 which is an OSI approved license.
The primary programming language of swift-java is Swift.