Shai Mishali
1 min readSep 1, 2017

--

I believe a third approach would just be

.subscribe(onNext: { [weak self] in self?.printInput($0) })

It is definitely more verbose, but TBH verbosity is one of the easiest ways to avoid retain cycles and unwanted side-effects

--

--

Shai Mishali
Shai Mishali

Written by Shai Mishali

iOS Tech Lead @ Gett 🚕 RxSwift & RxSwiftCommunity core contributor. International speaker and worldwide hackathon winner. Fiddling with tech for a living. 🤓

Responses (1)