Capacitor Memory Leak

Hi,

Currently when using location.reload(true) to refresh a page or any other page redirect method in Javascript, the memory in my iOS Capacitor app isn’t cleared.

So each time there’s a page redirect or reload, I see the usage memory doubles in Xcode’s app debugger when connected to a real iPhone device.

The result is that after a while, I always see iOS force reloading WKWebview in my Capacitor app and essentially breaking the user experience.

Is there a way to clear the memory via an API or plugin on page reloads or redirects to prevent this force reload?

Thank You!