posted on Wednesday, December 08, 2004 1:25 PM by Andrew Scott

IE Memory leak with HTC's?

I have been using the WebService.htc to call .Net Web services directly from IE. This utility works perfectly for creating very dynamic (client side) data driven applications (Chubby Clients). Though recently I have noticed that if numerous calls to the Web Service to retrieve and render large lists of Data the response of the client starts to lagg and the memory usage of IE grows very high until the page is reloaded, although the page is not actually any larger.  I have discovered that this only occurs when I am creating each item in the list as a htc it self.

I have created an IE Memory leak demo to show the effects of this problem.  I gather that the way I am removing the htc's is causing the problem.  I am using element.innerHTML = ""; in the example but i have tried the removeChild() method also but i still get the same memory increase.

Has anyone else seen this problem? 

N.B. It will only render in IE as MOZ doesn't support htc's

UPDATE:

Having posted this I discovered a post on MSDN Mag reffering this is exact problem!

http://msdn.microsoft.com/msdnmag/issues/04/06/WebQA/

Apperently there is a Fix by altering the registry but only for Internet Explorer 6.0 SP1. by adding this key  :-

HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Main\Cleanup HTCs

Changing this does work, shame it's not set by default!

According to MSDN the only other solution is to refresh the page!

http://support.microsoft.com/?id=309170

 

Comments