This repository has been archived by the owner on Dec 5, 2019. It is now read-only.
Question regarding @weakify and @strongify #65
Comments
Yes, that's correct. Using it within only one of those blocks means you'd still capture However, in this particular case, that won't actually cause a permanent retain cycle. Since animations are transitory in nature, the cycle will eventually be broken when the animation completes naturally (or is interrupted). I generally don't recommend the weak/strong dance for ephemeral things like animations and network requests. |
Okay, cool. Thanks @jspahrsummers Appreciate your comment about animation blocks and the like; I'd not actually considered that 👍 |
ghost
closed this as completed
Apr 3, 2014
No problem! ✌️ |
diederich
added a commit
to cocologics/libextobjc
that referenced
this issue
Jun 28, 2017
Submodule changes to be committed: * Configuration c8e5527...4ac967d (12): > Merge pull request jspahrsummers#80 from cocologics/feature/xcode9-update > Merge pull request jspahrsummers#79 from cocologics/feature/xcode9-update > Merge pull request jspahrsummers#71 from fabb/analyzer_localized > enable CLANG_ANALYZER_NONNULL > enable CLANG_WARN_NULLABLE_TO_NONNULL_CONVERSION > enables SWIFT_TREAT_WARNINGS_AS_ERRORS > Merge pull request jspahrsummers#67 from fabb/enable_nullability_completeness_warning > Merge pull request jspahrsummers#65 from Abizern/xcode8_debug_flag > Merge pull request jspahrsummers#64 from diederich/enableTestability > Merge pull request jspahrsummers#63 from diederich/implicitCaptureOfSelf > Merge pull request jspahrsummers#62 from calebd/xcode-8-beta-5-warnings > Merge pull request jspahrsummers#61 from ikesyo/disable-framework-codesigning
diederich
added a commit
that referenced
this issue
Jul 14, 2017
* bumped the xcconfigs to latest version * fix build on Xcode 9 ('void' missing in strict declaration checking) Submodule changes to be committed: * Configuration c8e5527...4ac967d (12): > Merge pull request #80 from cocologics/feature/xcode9-update > Merge pull request #79 from cocologics/feature/xcode9-update > Merge pull request #71 from fabb/analyzer_localized > enable CLANG_ANALYZER_NONNULL > enable CLANG_WARN_NULLABLE_TO_NONNULL_CONVERSION > enables SWIFT_TREAT_WARNINGS_AS_ERRORS > Merge pull request #67 from fabb/enable_nullability_completeness_warning > Merge pull request #65 from Abizern/xcode8_debug_flag > Merge pull request #64 from diederich/enableTestability > Merge pull request #63 from diederich/implicitCaptureOfSelf > Merge pull request #62 from calebd/xcode-8-beta-5-warnings > Merge pull request #61 from ikesyo/disable-framework-codesigning
This issue was closed.
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
I've just started using the
@weakify
and@strongify
macros fromEXTScope.h
and have a quick question about their proper usage.If used with a method such as UIView's
animateWithDuration:animations:completion:
do I need to use@strongify
in each block I reference the variable passed to@weakify
?For instance, is this the correct usage:
The text was updated successfully, but these errors were encountered: