Andrey Fomenkov
Andrey Fomenkov

Reputation: 109

How to detect leaked Disposable subscriptions in RxJava code?

My Android project has RxJava onboard. How to check that all Disposable resources are being released correctly and it time later after subscribe() calls?

Upvotes: 1

Views: 260

Answers (1)

Andrey Fomenkov
Andrey Fomenkov

Reputation: 109

To see all not disposed Rx subscriptions at the moment, use RxDisposableWatcher tool.
Read my post on Medium: Detect Leaked Subscriptions in RxJava code using RxDisposableWatcher

Features

  • HTML report with all necessary info:
    • full stack trace where subscribe() occurred
    • number of calls
    • observable type
  • supports RxJava 2.x and 3.x.

Example of HTML report

Upvotes: 1

Related Questions