Memory Leak

Welcome! Forums Unity Plugins In-App Web Browser Memory Leak

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #152
    chrischris
    Participant

    Hey Piotr,

    it seems like the WebView is leaking memory on both iOS and Android. When I open up a website, close it again and repeat that several times, the memory consumption will constantly increase.

    This seems to be a general problem with WebViews on both iOS and Android though. I already read a lot of posts about that, but couldn’t find any solution, yet.

    Have you experienced similar issues or do you know how to fix this?

    Thanks in advance,
    Chris

    #155
    PiotrPiotr
    Keymaster

    Hi,

    Yeah, this is common problem with WebViews and regular desktop browsers really (Chrome, huh).

    I don’t know how to fix it, although I am not sure if it’s really memory leak here.
    Keep in mind that this memory is used by JavaScript engine which might release its state long time after you app get closed. It’s not handled by Android’s GC or reference counting system on iOS.

    In addition, there are some methods to “clear” resources taken by WebView, and I am calling them once user closes browser but haven’t really noticed they actually do anything.

    Sorry for not being super helpful, but this is simply ignored by Apple/Google engineers for years.

    #156
    chrischris
    Participant

    Thanks Piotr,

    I already thought so and I had the same problems with another Plugin as well. If a solution or workaround comes up in the future please let me know!

    Thanks again,
    Chris

Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.