question

NPRASANTKUMAR-7539 avatar image
0 Votes"
NPRASANTKUMAR-7539 asked LeonLu-MSFT commented

Xamarin webview is leaking huge memory.

I need to pass large string to update the html continuously. I am using the below mentioned line to send the data from C# to JavaScript.

Webview.Eval($"javascript: processPatientDataMessage('{jsonData}')");

I am monitoring the memory from windows task manager and Diagnostic Tool window in Visual Studio 2019.

Can anyone help me to fix the problem. Its urgent.

Thanks in advance.

dotnet-xamarin
· 4
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

It seems the issue is not related to SCCM, so I removed tag mem-cm-general and added tag dotnet-xamarinforms.

0 Votes 0 ·

Do you find the huge memory leak when application debugging? Please check if you enabling XAML Hot Reload, if enabled please close it then monitor it again.

0 Votes 0 ·

Yes I can see huge memory leak when the application is in debugging. XAML Hot Reload is disabled. Still I can see the memory leak.

0 Votes 0 ·

When you custom renderer for your webview, did you release it(in the Dispose method, call ((HybridWebView)Element).Cleanup(); ) like this thread:https://docs.microsoft.com/en-us/xamarin/xamarin-forms/app-fundamentals/custom-renderer/hybridwebview#create-the-custom-renderer-on-android

0 Votes 0 ·

0 Answers