Skip to content

Webview Texture Leaking and Crash #5

@firdiar-mita

Description

@firdiar-mita

I got crash when testing in android. the crash caused by out of memory.

how to reproduce

  • Initialize webview
  • Destroy webview
  • Repeat~

doing this several times, will continously bloat up the memory then crashed
image

This is my solution
image

appearently if we create new Texture2D() in Runtime, we need to explicitly destroy it when no longer use it, otherwise it'll be memory leak. normally it will be cleaned up everytime the scene is changed (*using single mode) but in my case, i've always loading additive scene

I see that we already released the texture in the java lib, but idk, above solution just works for me.
image

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions