Skip to content

Either hide or heavily discourage the use of reference and fromRef #979

Closed as not planned
@HosseinYousefi

Description

@HosseinYousefi

Although safe methods like castTo are provided, users might still use fromRef and .reference to manually cast objects (see #970), keep references without properly managing their lifecycle, etc. Therefore, JniGen generated code should heavily discourage the use of these inner workings and eventually hide them. Right now, we need references to send these finalizable JObjects between multiple isolates, but dart-lang/sdk#55062 will make these objects sendable.

cc/ @dcharkes

Metadata

Metadata

Type

No type

Projects

Status

Done

Relationships

None yet

Development

No branches or pull requests

Issue actions