-
Notifications
You must be signed in to change notification settings - Fork 431
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Question about Signal leak / memory managment #92
Comments
If you obtain a reference to the produced signal, it does turn This is caused by a caveat of Swift's ref-counting implementation: while the object is deinitialized after its last strong reference is ceased, the object would not be freed until all its weak references have been touched. If you do not retain the cancel disposable, which indirectly holds a weak reference to the signal, Instruments would no longer catch this leak.
|
@andersio Thanks for responding so quicky. Can you show me the code for seeing the reference go to nil after completion? |
Instruments caught a leak. But the signal is freed after accessing the weak
No leak was caught.
Instruments caught a leak, but the signal should be freed after the disposable is thrown away.
|
I'm seeing some leaks with ReactiveSwift. I'm using the alpha so wondering if this is known, or if I'm missing something.
Using ReactiveCocoa (5.0.0-alpha.3)
Using ReactiveSwift (1.0.0-alpha.3)
Using Result (3.0.0)
Why does this code leak a Signal?
Also a similar example with a Disposable
The text was updated successfully, but these errors were encountered: