Group Group Group Group Group Group Group Group Group

Retain cycle in ArticleListController

#1

Hi there,
Looks like the token assignment in viewDidLoad creates a Retain Cycle. ArticleListController is never deinitialized. Capture list should be added.

token = NewsAPI.service.observe(.articles) { [weak self] _, _ in
// 3
DispatchQueue.main.async {
// 4
self?.tableView.reloadData()
}
}

#2

@jeka53 Thank you for the heads up - much appreciated! :]

1 Like
#3

Cu placere)
You can mark topic as closed I think.

closed #4

This topic was automatically closed after 166 days. New replies are no longer allowed.