Skip to content
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

Resolve retained cycle issues with onButtonClicked(_:), onActionButtonClicked(_:) and onTextChanged(_:) #17

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

rlarjsdn3
Copy link

@rlarjsdn3 rlarjsdn3 commented Jan 3, 2025

I resolved the strong reference cycle issue caused by the above method. The root cause of the cycle was that the SwiftAlertView object strongly referenced the onButtonClicked closure, while the closure also referenced the SwiftAlertView object through self. I resolved the issue by adding the [unowned self] keyword to the closure.

thanks.

@rlarjsdn3 rlarjsdn3 changed the title Solve retained cycle issue with onButtonClicked(_:), onActionButtonClicked(_:) and onTextChanged(_:) Resolve retained cycle issues with onButtonClicked(_:), onActionButtonClicked(_:) and onTextChanged(_:) Jan 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant