okta-oidc-ios
okta-oidc-ios copied to clipboard
URLSession leak
Describe the bug?
Okta framework is showing memory leaks when run in debug memory graph. Appears to be caused by not invalidating the session after use.
https://lapcatsoftware.com/articles/NSURLSession.html
What is expected to happen?
Framework should not leak memory.
What is the actual behavior?
URLSession is leaking.
Reproduction Steps?
Initialize OktaOidcStateManager and observe memory leaks in Debug Memory Graph. All the reported leaks in this screenshot appear to be from the URLSession allocated in OktaOidcConfig.setupURLSession
Additional Information?
No response
SDK Version(s)
3.11.2
Build Information
No response
Thank you for submitting this @rickbdotcom. I would suggest you look into the new Okta Client SDK at okta-mobile-swift which replaces this legacy OIDC SDK. For more information, you can see the blog post announcing the modern authentication SDK.
Oh thank you! I was just running memory leak testing on our application and this was the current version of the SDK we were using. I will upgrade and see if that fixes the issue. Thanks!