Memory leak on IE

I've been using the shadedborder script in some GWT (Ajax) projects. The biggest problem I faced was the memory leak problem under IE (which is a IE problem by the way). By adding just a few rendered elements to a web page you hardly notice the leakage, but when using a lot of rendered elements, or a lot of pages that contain rendered elements, IE's memory consumption goes pretty high, and the memory usage isn't released until the 'browser' is fully closed. The leaking can be checked with DRIP.

For this reason I tweaked the script such that memory leaks are avoided, which however required a slightly different approach.

Another option I included is that it allows you to use a css class-name different from the default .sb-inner. This comes in hand if you require to nest rendered elements under IE.

Anyway, in the ShadedBorder comments (of before the forum) some asked me to share this tweak. So here it is: http://www.sierraware.nl/shadedborder/simple.html

The tweaked script is in test mode and hasn't been optimized. I'm a Java programmer and not an expert on javascript, so some of you will probably see better solutions and optimizations.

For the tweaked script I've also developped some nice GWT wrappers that may render the elements before the page is shown, and re-use elements. Anyone's interested, let me know.

Piotr

Trackback URL for this post:

http://www.ruzee.com/trackback/174

Woa ...

Hi Piotr,

that's what I call refactoring ;-) - incredible what you did!

Thanks for sharing!