I have an application that make heavy use of TWebBrowser to show GoogleMaps. The problem is that the memory is not deallocated properly. I also notice that for each instance of TWebBrowser it starts new threads. Those are also left. It take CPU resources and memory.

I have an application that make heavy use of TWebBrowser to show GoogleMaps. The problem is that the memory is not deallocated properly. I also notice that for each instance of TWebBrowser it starts new threads. Those are also left. It take CPU resources and memory.

So how can close TWebBrowser instance properly, close threads and deallocate memory?

Comments

  1. My last company stopped using TWebBrowser some time ago, not for this reason but others, including that it required a call to ProcessMessages when initializing or when loading a web page (I forget which.) There were other reliability problems too from memory.

    Can you use a different web browser control, such as Chrome embedded?

    ReplyDelete
  2. Steve Maughan thanks for the link. We have done a lot of effort in current solution. The map component from TMS did not support D2007 that we use. What a pity! About some year ago we tried Chrome embedded but it was too unstable. There is long term plans to upgrade to never Delphi but it is a huge effort to add Unicode support on some components.

    ReplyDelete
  3. Roland Bengtsson if your app has any long term strategic value for your company (i.e. if it's a core product), I'd suggest biting the bullet and upgrading (even if it mean changing component vendors). You're going to need to do so at some stage - better now when you "have the time" than when you're in crisis mode because it doesn't run on some new OS.

    ReplyDelete

Post a Comment