You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I just have one short question, in your ViewModels transform:input method you do use capture list to weakify self, e.g. in EditPostViewModel
letsavePost= saveTrigger.withLatestFrom(post).flatMapLatest{ post inreturnself.useCase.save(post: post).trackError(errorTracker).asDriverOnErrorJustComplete()}
You use self.useCase.save, isn't this a retain cycle? Dont we have to use:
letsavePost= saveTrigger.withLatestFrom(post).flatMapLatest{[weak self] post in
guard let `self` =selfelse{return someStuff }returnself.useCase.save(post: post).trackError(errorTracker).asDriverOnErrorJustComplete()}
Thanks!
The text was updated successfully, but these errors were encountered:
I just have one short question, in your ViewModels transform:input method you do use capture list to weakify self, e.g. in EditPostViewModel
I do not think it's a retain cycle as we do not keep reference to the savePost observable. It's retained by the disposeBag in the ViewController which will release everything on deinit.
So there is no need even for unowned in the CreatePostViewModel
Hey! Awesome project! Your code is so inspiring!
I just have one short question, in your ViewModels
transform:input
method you do use capture list to weakify self, e.g. inEditPostViewModel
You use
self.useCase.save
, isn't this a retain cycle? Dont we have to use:Thanks!
The text was updated successfully, but these errors were encountered: