Closed swankjesse closed 2 months ago
In leakCanaryJni.kt we keep a global list of services we’re worried about leaking.
leakCanaryJni.kt
This is useful to detect leaks where the lifetime of a bound service is narrower than the lifetime of a Zipline instance.
Zipline
But it also creates a leak when the Zipline instance is closed.
We should evict items from allReferencesSet in Zipline.close().
allReferencesSet
Zipline.close()
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
inZipline.close()
.