我在程序中不断的给窗体中的9个AxWebBrowser通过Navigate(url)的方式加载页面,加载页面后获取内容,然后重新Navigate加载新页面,可是内存一个劲的飙升,直到Exception of type System.OutOfMemoryException was thrown为止,请问这我该怎么释放内存呢?我现在的方法是这样的mshtml.HTMLDocumentClass doc = (mshtml.HTMLDocumentClass)axWebBrower1.Document;***获取内容部分****doc.close();
doc.clear();
Marshal.ReleaseComObject(axWebBrower1.Document);但却没用。