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?
Weak references
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.
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
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.
Ok, Is there a way to determine whether or not strong reference will create reference cycle.
Seems you should better always use weak self
, or take enough time to learn about reference cycle.