Post

Replies

Boosts

Views

Activity

Reply to SwiftUI retain cycle with .searchable
Yes that makes sense. Now the search model is created in the ancestor view ... I think that would be less ideal. The model is very light weight and essentially only providing a bindable publisher and some (web) search functionality ... this probably doesn't need to outlive that view and it would be ok to create a new model alongside a view push ... Interestingly a TextField with the same binding to Retainer would behave as expected ... the model would be deallocated when the view is removed from the view stack ...
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Mar ’22
Reply to DispatchSerialQueue not conforming to UnownedSerialExecutor in iOS 17.0
Looks like DispatchSerialQueue does not inherit from _DispatchSerialExecutorQueue as per documentation: https://developer.apple.com/documentation/dispatch/dispatchserialqueuehttps://developer.apple.com/documentation/dispatch/dispatchserialqueue
Topic: Programming Languages SubTopic: Swift Tags:
Replies
Boosts
Views
Activity
Oct ’23
Reply to SwiftUI retain cycle with .searchable
Yes that makes sense. Now the search model is created in the ancestor view ... I think that would be less ideal. The model is very light weight and essentially only providing a bindable publisher and some (web) search functionality ... this probably doesn't need to outlive that view and it would be ok to create a new model alongside a view push ... Interestingly a TextField with the same binding to Retainer would behave as expected ... the model would be deallocated when the view is removed from the view stack ...
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Mar ’22