Weak references

I believe weak references are not required when using self inside the dispatch queues. Is there any other occasions where weak self is not required related to closure?

  • I believe weak references are not required when using self inside the dispatch queues. I do not understand what you mean. There may be many cases you should use weak even when using self inside the dispatch queues.

  • How to determine whether weak self is required or not.

  • Whether it may make a reference cycle or not. If you cannot judge it by yourself, better use weak self always.

Replies

I hope this may help a little:

h t t p s : / / w w w.hackingwithswift.com/articles/179/capture-lists-in-swift-whats-the-difference-between-weak-strong-and-unowned-references