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
Whole concept with new NSURLSession per request seems wrong to me. Because each NSURLSession is ready to process multiple tasks. Why won't create one shared instance of NSURLSession per pinnedCertificatePaths?
Then you could put cert validation into NSURLSessionDelegate as you do now. And json parsing error checking into task completionHandler.
Other option is to invalidate session when task is processed as shown above.
Version of Realm and Tooling
Realm framework version: 3.10.0
Realm Object Server version: 3.4.3
Xcode version: 10.1
iOS/OSX version: iOS 12.1.2
Dependency manager + version:
The text was updated successfully, but these errors were encountered:
!!! MANDATORY TO FILL OUT !!!
Goals
Receive synchronized realm.
Expected Results
Realm is returned. No leaks happened.
Actual Results
RLMNetworkClient leaks NSURLSessions.
Steps to Reproduce
Every call to [RLMNetworkClient sendRequestToEndpoint] leaks one NSURLSession.
Code Sample
Leaking delegate code:
Fixed proof of concept (ugly, but won't leak):
Whole concept with new NSURLSession per request seems wrong to me. Because each NSURLSession is ready to process multiple tasks. Why won't create one shared instance of NSURLSession per pinnedCertificatePaths?
Then you could put cert validation into NSURLSessionDelegate as you do now. And json parsing error checking into task completionHandler.
Other option is to invalidate session when task is processed as shown above.
Version of Realm and Tooling
Realm framework version: 3.10.0
Realm Object Server version: 3.4.3
Xcode version: 10.1
iOS/OSX version: iOS 12.1.2
Dependency manager + version:
The text was updated successfully, but these errors were encountered: