简体   繁体   中英

Limit WebBrowser from consuming too much memory

I'm working on a project that involves WebBrowser control and have the following questions.

  1. Is it possible to limit how much memory each instance of WebBrowser can consume?

  2. Will enabling javascript increase WebBrowser memory consumption

Generally the idea is the project must use the WebBrowser so that i use less memory? Currently my App does exceed 145 mB of RAM usage when using WebBrowser control. If without using WebBrowser control it's only at maximum 50 mB.

1) As far as i'm aware there's no API available to limit the RAM usage of an application/task - it's down to the OS's discretion and/or the functionality used by the application.

2) JavaScript is executed on the client, therefore it would be safe to assume there would be an increase in memory consumption.

I reccomend that you try and run your application through the performance profiler that comes with the latest SDK (7.1).

Nokia have a great set of articles covering memory usage, especially when encountering the 256MB devices.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM