ainame / AMEURLSession

AMEURLSession provide the simple and customizable interface of NSURLSession family classes to easy using.
MIT License
6 stars 1 forks source link

NSURLSession leaked #3

Open ypresto opened 10 years ago

ypresto commented 10 years ago

AMEURLSessionURLLoader always recreates NSURLSession instance on every currentSession or currentBackgroundSessionWithCompletionHandler: calls. Also it does not call invalidateAndCancel or resetWithCompletionHandler: (documented in "Important" section of sessionWithConfiguration:delegate:delegateQueue:). This leads app to keeping strong reference to every delegates and causing memory leak.

https://github.com/ainame/AMEURLSession/blob/master/AMEURLSession/Classes/AMEURLSessionURLLoader.m#L133

ainame commented 9 years ago

I will fix this. Thanks your report.