You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
IMPORTANT
The session object keeps a strong reference to the delegate until your app exits or explicitly invalidates the session. If you do not invalidate the session by calling the invalidateAndCancel or finishTasksAndInvalidate method, your app leaks memory until it exits.
在 ImageDownloader 里 session 是一个 strong property
private var session: NSURLSession?
在 ImageDownloader 的 init 里
NSURLSession 的文档提到
defaultDownloader 是不会 deinit 的单例所以不影响,但是如果自定义 ImageDownloader 有可能会造成内存泄露
The text was updated successfully, but these errors were encountered: