Closed BwackNinja closed 6 months ago
If a method returns an object that isn't a GObject, it is currently owned by the JVM even when annotated with transfer-ownership="none" in the GIR file. An example of this is gst_caps_get_structure. This result in use-after-free errors since it is cleaned up unless a reference to it is retained. Relevant code is here: https://github.com/jwharm/java-gi/blob/development/buildSrc/src/main/java/io/github/jwharm/javagi/generators/MethodGenerator.java#L255
Fixed in release 0.10.0
If a method returns an object that isn't a GObject, it is currently owned by the JVM even when annotated with transfer-ownership="none" in the GIR file. An example of this is gst_caps_get_structure. This result in use-after-free errors since it is cleaned up unless a reference to it is retained. Relevant code is here: https://github.com/jwharm/java-gi/blob/development/buildSrc/src/main/java/io/github/jwharm/javagi/generators/MethodGenerator.java#L255