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.
AMEURLSessionURLLoader always recreates NSURLSession instance on every
currentSession
orcurrentBackgroundSessionWithCompletionHandler:
calls. Also it does not callinvalidateAndCancel
orresetWithCompletionHandler:
(documented in "Important" section ofsessionWithConfiguration: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