Learn everything you need to know about Swift's defer keyword in this short video. This video is a companion for this blog post: www.donnywals.com/what-is-def...
Пікірлер: 9
@victorriurean2 ай бұрын
👍
@BookmarkMountain2 ай бұрын
Really well explained thank you!
@DonnyWalsdevАй бұрын
Thanks for watching!!
@toddlask2 ай бұрын
your videos are beyond my noobie level but really interesting!
@DonnyWalsdev2 ай бұрын
Thanks! Are there any topics that you're currently learning about or interested in that I could cover?
@toddlask2 ай бұрын
@@DonnyWalsdev hey thx for asking! im kinda interested in the life cycle and object structure of a running app. like the dom in the old internet explorer. im an older programmer and want to understand the modern new ways of swift. im very curious how the app sees the environment variables and settings, other views and classes... i hope this makes sense.
@nicolaiharbo22012 ай бұрын
I’ve been aware of the feature for a long time, but never found a reason to use it honestly. Always thought of it, as a bit useless. Is it something you use often, and if yes, for what? Like, very specific use cases would be appreciated 😊
@DonnyWalsdev2 ай бұрын
I don't use it often. Mostly for stuff like in the example from the video where there might be multiple exit points for the function and I always need to unset/restore some state. It's useful for that, but not something I use very often
@markaurelius612 ай бұрын
It would be to close a connection to a database, for example. Many of the things that would have been useful for though are handled by ARC.