前回、前々回とNSURLSessionを取り扱ってきた。
[iOS] NSURLSessionを使って通信を行う
[iOS] NSURLSessionでマルチパートデータを送信する
NSURLSessionはとても便利だが、しっかりとセッションの後処理をしないとメモリリークが発生するようだ。
公式ドキュメントにこのように書いてある。
NSURLSession Class Reference
The session object keeps a strong reference to the delegate until your app explicitly invalidates the session. If you do not invalidate the session by calling the
続きを読む
[iOS] NSURLSessionを使って通信を行う
[iOS] NSURLSessionでマルチパートデータを送信する
NSURLSessionはとても便利だが、しっかりとセッションの後処理をしないとメモリリークが発生するようだ。
公式ドキュメントにこのように書いてある。
NSURLSession Class Reference
The session object keeps a strong reference to the delegate until your app explicitly invalidates the session. If you do not invalidate the session by calling the
invalidateAndCancel
orresetWithCompletionHandler:
method, your app leaks memory.続きを読む