How to Fix the Memory Leak in IE WebBrowser Control?

后端 未结 18 845
走了就别回头了
走了就别回头了 2020-11-27 05:33

I am trying to embed a WebBrowser Control in a C# Winform Application. This sounds easy enough. However I discovered that the WebBrowser control eats up a lot of memory ever

18条回答
  •  一整个雨季
    2020-11-27 05:59

    I experienced this problem with a simple webbrowser control on a form. It navigated to one web page and stayed there. According to task manager within 10 minutes it ate up 2gb of memory from 120mb.

    A simple solution for my project was to go to the webbrowser controls properties in visual studio and change the 'AllowNavigation' to false. Now when I run my program it stays at 120mb. I hope this helps someone!

提交回复
热议问题