#iOS #swift #softwaredeveloper #iosdeveloper Thank you for watching this video 🙌 ➜ Website: www.swiftwithvincent.com ➜ Twitter: / v_pradeilles ➜ GitHub: github.com/vincent-pradeilles/ ➜ LinkedIn: / vincentpradeilles
КОМЕНТАРІ: 14
@v_pradeillesРік тому
⚠ There's a a slight mistake at 04:10: while it's true that the `Task.detached` won't be canceled, it would have also been the same for a regular `Task`. ⚠
@mazedar_tv4 місяці тому
so is Task.detached beneficial only if developer wants that task to execute out of main actor?
@FloWritesCodeРік тому
Tip #2 was really good, Vincent! I never thought about where to place the guard let self. Thanks for sharing!
@v_pradeillesРік тому
You're welcome! It's such a tricky pitfall 😩
@mazedar_tv21 день тому
main culprint is await notifiaction (async in async), so we needed this solution.
@edwardhasted384910 місяців тому
This is one of the most eloquent and succinct coding explanations I have found to date. Très cordialement
@alkincakiralar9932Рік тому
Yesterday, i learned retain cycle from your previous videos. Today I try the Tip #2 in new sample project and I realized that the ViewModel not delocating from memory if we use the listenNotifications method as the first example. I check the ViewModel class allocation in memorygraph with everysteps to learn what's going on in the memory. Thank's for this valuable post for us !
@yonaharel1122Рік тому
Thanks for the video! I have a question about point 2 of the video. Does creating the async stream has different effect on memory when created outside of the Task closure or inside?
@madman33422 дні тому
What if I need to reference self. before loop? like: for await value in self.manager.$items.values {...}
@Foxdie993Рік тому
4:10 Are you sure that a Task (A simple Task, without detached) inside a Task will cancel in a cascade way?
@v_pradeillesРік тому
You’re right, it wasn’t the best example, I’ve pinned a comment with a warning
@victorriureanРік тому
nice
@LucasAbijmilРік тому
Tip #1 is interesting, however in case the refresh token is expired, it would cause a double request to get a new one. How can we avoid this with?
@v_pradeillesРік тому
That's an interesting point! I guess it's a matter of whether you want to optimize for the normal case or for the edge case. If there's no real bad consequence to make two calls for nothing when the token has expired, I'd say it's better to stick with this simpler solution.