Skip to content

Retain Cycle CocoaAction #235

Description

@Marcin951

Hey I noticed retain cycle in this example code

    let forgotPasswordAction = CocoaAction {
        return .create { [weak self] (observer) -> Disposable in
            guard let self = self else { return Disposables.create() }
            self.delegate?.didTapForgotPasswordButton()
            
            observer.onCompleted()
            return Disposables.create()
        }
    }
    
    forgotPasswordButton.rx.action = forgotPasswordAction

RxSwift 6.0.0
Action latest version from master

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions