readium/r2-navigator-swift

Possible memory leaks from webview

ehapmgs opened this issue · 3 comments

I was running the test app i have noticed that after opening some epub and navigating between chapters (webviews) that the memory kept increasing as you see in the picture even tho after navigating back to the main screen

Screen Shot 2019-04-17 at 7 44 54 PM

looking at safari develop tab it seems all the previous webviews loaded in the app

Screen Shot 2019-04-17 at 7 46 22 PM

and in the memory graph debugger i have noticed the webviews still allocating memory

Screen Shot 2019-04-17 at 7 47 15 PM

and deinit never being called in WebView class, can you advice on this ?

It's a known issue (although it was not reported) that I planned to tackle in the next few days. But if you have any clues on the cause of the leak before I start, any information is welcome. ;)

@ehapmgs This PR fixes the leak: #41 It should be merged in develop in the next couple of days.

Thanks @mmenu-mantano, doing the same tests above the issue seems to be fixed