Martin
Martin copied to clipboard
memory leak
Describe the bug We found memory leaks in the library. Every time the app gets active from the background, memory leaks are generated from XMPPDNSSrvResolver resolve(timeout: TimeInterval) Our app stops connection when goes in background.
To Reproduce Steps to reproduce the behavior:
- Open XCode instruments and open leaks and start recording
- open the app, go in background, wait few seconds and reopen the app
- you can see the memory leak appear, try few times the step 2
- stop recording leaks and wait the finish
- at the end you can see appear error on
XMPPDNSSrvResolver resolve(timeout: TimeInterval)
Expected behavior
there you have 2 closures one inside another the last generate a retain. Here you need the [weak self] or unowned than after you need to arrange the code on your choice
Screenshots I've attached 2 screenshots to better understand
Smartphone:
- Device: tested with iPhone 11 / iPhone 11 pro Max but i think all iphone with iOS
- OS: iOS 16.02
- Version Martin Master lastest
Fix was applied in ada5d7e2720964a84f98e7546402568428210a46
Thanks, it works.