memory leak (#132)
Unknown opened 2 years ago

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:

  1. Open XCode instruments and open leaks and start recording
  2. open the app, go in background, wait few seconds and reopen the app
  3. you can see the memory leak appear, try few times the step 2
  4. stop recording leaks and wait the finish
  5. 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
Schermata 2022-10-21 alle 13 30 04 Schermata 2022-10-21 alle 13 29 38
Unknown commented 2 years ago

Fix was applied in ada5d7e2

Unknown commented 2 years ago

Thanks, it works.

issue 1 of 1
Issue Votes (0)
Watchers (0)
Reference
tigase/_libraries/Martin#132
Please wait...
Page is in error, reload to recover