Post

Replies

Boosts

Views

Activity

Reply to What is causing this error?
What's the difference though? You have @State region or @State vm - they are both states of the view. If you (Map) update region, it updates the main view's state. If you (Map) update vm, it has a published property, so it also updates the main view's state. In my simple experiment both of these implementations were causing exactly the same warning. Tested with iOS 16. Which makes sense to me, as both versions are doing the same thing - updating state of the main view.
Sep ’22
Reply to Combine retain cycle created in .flatMap & Fail
I've just stumbled upon the same issue. At first, I had something more complex going on in flatMap and assumed that I created a retain cycle there myself. Then I dumbed down flatMap to just returning Fail, just as in the example above and saw a memory leak. I replaced flatMap with tryMap and the leak was gone. Sadly, for my needs, I do need that flatMap, but I certainly don't understand the reason for that leak...
Apr ’21