tokopedia / RxComposableArchitecture

RxComposableArchitecture is a forked of Composable Architecture with adjustment to make it work with UIKit.
Apache License 2.0
31 stars 5 forks source link

Fixing Memory Leak on Scope Child Reducer #91

Closed dikasetiadi closed 1 year ago

dikasetiadi commented 1 year ago

We found that our scoped reducer having memory leak issue when we tried to open simple example (you can tried on ScopingVC.swift) and pop the page, it will still having the scoped reducer reference in our app.

How: We fixed the disposeBag reference to the childStore reference so when the scoped reducer is destroyed, it will also disposed the relay(our scope State stream) of the scoped reducer