Skip to content

Commit

Permalink
[workflow-abandon-is-causing-memory-self-when-weakly-referenced] - Fi…
Browse files Browse the repository at this point in the history
…xes an issue where holding self weakly is causing a memory leak when calling workflow.abandon - nk
  • Loading branch information
nickkaczmarek committed Mar 8, 2022
1 parent a6b7b22 commit caca894
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ extension AnyWorkflow {
*/
public func abandon(animated: Bool = true, onFinish:(() -> Void)? = nil) {
if let presenter = orchestrationResponder as? UIKitPresenter {
presenter.abandon(self, animated: animated) { [weak self] in
self?._abandon()
presenter.abandon(self, animated: animated) { [self] in
self._abandon()
onFinish?()
}
} else if let responder = orchestrationResponder {
Expand Down

0 comments on commit caca894

Please sign in to comment.