Closed hakkurishian closed 5 years ago
Hi @hakkurishian I took a look at the code and I think you making the Subscriptions
in wrong way. If you want that resource to be deallocated when the second view is deallocated then you have to have a disposeBag in the second view and using it during prepare for segue. The problem you raised has nothing todo with Action
it's self. It's about managing your view properly.
Thank you, it worked perfectly. Indeed it was part of my misunderstanding on how DisposeBag worked.
Possibly related to #41. Is it a misunderstanding (if so, how to handle it properly) or a memory leak that an action associated with a view controller gets not deallocated, and therefore its subscriptions disposed when the view controller gets destroyed?
Demo-Project
VC1 (List):
VC2 (Detail):
Process
Expectation After 6. resources for the action ( property of VC2) get deallocated and the subscription to it disposed
Observation The Action and its Rx-related resources leak.
Problem I'm excessively using the Action framework in my app and deal with these issue all over it.
What would be the correct way to produce the expected behaviour and why, if its not a bug, is the behaviour above produced, leading to an accumulation of RX-related resources.