Open EricDuport opened 1 year ago
Hi Eric,
Thanks for reaching out, and apologies for the delay in replying.
We have investigated this internally, and while we have been able to reproduce the memory leak you have reported, we have not been able to isolate whether BugSnag is the cause of this memory leak. Essentially, while testing we have found that Xcode Instruments is saying non-instantiated items are being leaked, with this also occurring when BugSnag is not doing anything at all. This suggests to us that these memory leaks may be getting mis-reported by the Xcode instruments tool.
We would like to continue investigating this and would be interested to know if you use BugsnagNetworkRequestPlugin
in you application?
Hello Matthew,
I work with Eric and will take over this issue.
I confirm we use the BugsnagNetworkRequestPlugin
in our applications (we have three apps currently using BugSnag with this issue).
Hi @iMac0de, we have just released a new version bugsnag-cocoa v6.27.0 which should remove the need to generate a URLSession when copying a configuration.
In the process we have also discovered an additional issue which ultimately is due to a leak in Apple's code. However, when Bugsnag-Networking is added, we swizzle this method, so any time anyone creates a URLSession (rather than using the default one), our swizzled method ends up in the stack trace when the profiler detects a leak, and then it looks like we’re the ones causing the issue. Trying to address this is still on our backlog.
I would suggest to upgrade to v6.27.0 when convenient and let us know how you get on, as it should hopefully improve it for you.
Describe the bug
a configuration load is enough to have a memory leak.
Steps to reproduce
BugsnagConfiguration.loadConfig()
Environment