[jni] Reference leaks in JNI

Open
#3,822 0 comments 0 reactions 1 assignee View on GitHub

Maintainers usually reply within 2 days

@liamappelbe is already working on this.

Since Nov 25, 2026.

Assessment

This issue has not been assessed yet.

Description

lang-java package:jni package:jni_flutter package:jnigen

Working on writing more reference tracking tests in package:jni, and found more cases (in addition to https://github.com/dart-lang/native/issues/3806) where temporary references are being leaked. These references will hang around until the next Dart GC, which unnecessarily uses up the global reference budget.

  • Collection adapter methods
  • Exception handling utils
  • JImplementer
Dominant language
Dart
Stars
280
Forks
166
Avg merge
3d 4h
Merged PRs (30d)
33

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from dart-lang/native

All issues in dart-lang/native

Similar issues

More Dart issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.