You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
is called, but the corresponding AggregatingVitalMonitor.unregister calls never happen.
The session-scoped AggregatingVitalMonitors hold a map of listeners, and the
map continues to grow, since listeners are never unregistered when the view is stopped, causing a memory leak.
Reproduction steps
break on VitalMonitor.register and VitalMonitor.unregister while starting / stopping views. observe the map of AggregatingVitalMonitor.listeners continues to grow.
Logcat logs
No response
Expected behavior
Vital monitor listeners are unregistered from the listeners map when a view is stopped.
Affected SDK versions
2.8.0
Latest working SDK version
NA
Did you confirm if the latest SDK version fixes the bug?
Yes
Kotlin / Java version
No response
Gradle / AGP version
No response
Other dependencies versions
No response
Device Information
No response
Other relevant information
No response
The text was updated successfully, but these errors were encountered:
A little additional context: we originally found this by leveraging a new LeakCanary feature (WIP) that helps detect objects that are repeatedly growing. The tool surfaced the below trace and then @joshskeen & team investigated and found the exact issue.
Describe the bug
in RumViewScope.init,
dd-sdk-android/features/dd-sdk-android-rum/src/main/kotlin/com/datadog/android/rum/internal/domain/scope/RumViewScope.kt
Line 145 in cff8b54
is called, but the corresponding AggregatingVitalMonitor.unregister calls never happen.
The session-scoped AggregatingVitalMonitors hold a map of listeners, and the
dd-sdk-android/features/dd-sdk-android-rum/src/main/kotlin/com/datadog/android/rum/internal/vitals/AggregatingVitalMonitor.kt
Line 16 in cff8b54
Reproduction steps
Logcat logs
No response
Expected behavior
Vital monitor listeners are unregistered from the listeners map when a view is stopped.
Affected SDK versions
2.8.0
Latest working SDK version
NA
Did you confirm if the latest SDK version fixes the bug?
Yes
Kotlin / Java version
No response
Gradle / AGP version
No response
Other dependencies versions
No response
Device Information
No response
Other relevant information
No response
The text was updated successfully, but these errors were encountered: