On Aug 9, 2007, at 10:08 PM, Andreas Hocevar wrote:

> Hi,
>
> On 8/9/07, Steven M. Ottens <[EMAIL PROTECTED]> wrote:
>> I'm investigating the memory leak bug (http://jira.codehaus.org/
>> browse/MAP-404) and already discovered that ButtonBase.js is creating
>> useless <img> elements which leak (lines 79 and 86). Since only the
>> src is required the createElement("IMG") can actually be skipped.
>
> I agree. This is a remainder from pre-OpenLayers.

Ok I will patch ButtonBase.js and commit it tomorrow
>
>> Still there are leaks with buttons.  I noticed that OpenLayers has a
>> destroy function at certain places.
>
> OpenLayers also has onunload events that take care of destroying  
> objects.
>
>> Any opinions? Ideas how to implement this or alternative ways to get
>> rid of leaking widget-DIVs?
>
> The question is: do we really need to care about memory leaks when
> unloading? IMO mapbuilder application are usually single-page
> applications, and if the page is unloaded, the user is finished and
> will maybe even close the browser.

Actually I have a customer who has a big problem with the memory  
leak. In this application mapbuilder is part of a bigger process  
where mapbuilder is switched on and off multiple times. So that's why  
I'm diving into this memory leak. I discovered that the problem is  
with all XSL generated widgets. Somehow IE cannot destroy XSL  
generated widgets. According to drip, the DOM elements generated by  
XSL stay unattached in memory. I can alter attributes of the elements  
but I cannot say element = null for some reason.
If anyone knows why IE refuses to destroy XSL generated widgets or  
knows ways to destroy them I'd like to hear them. ATM I believe it  
has something to do with this.stylesheet as defined in WidgetaBseXSL
>
>> Obviously this will be a large change and is meant for after the
>> release.
>
> Agreed, and IMHO this memory leak thing is not top priority.

In general I agree, there are only a few usecases where it is a  
problem, and unfortunately I have one :(

Steven




-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
_______________________________________________
mapbuilder-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mapbuilder-devel

Reply via email to