cashapp / zipline

Run Kotlin/JS libraries in Kotlin/JVM and Kotlin/Native programs
Apache License 2.0
1.98k stars 152 forks source link

Zipline’s leak detector . . . leaks #1287

Closed swankjesse closed 2 months ago

swankjesse commented 2 months ago

In leakCanaryJni.kt we keep a global list of services we’re worried about leaking.

This is useful to detect leaks where the lifetime of a bound service is narrower than the lifetime of a Zipline instance.

But it also creates a leak when the Zipline instance is closed.

We should evict items from allReferencesSet in Zipline.close().