I create a ticket on the trac, and attach my testing page.

http://dev.rubyonrails.org/ticket/10782

On Jan 12, 5:54 pm, wpc <[EMAIL PROTECTED]> wrote:
> Hi there:
>
> I wonder is there anyone else having same memory problem with us for
> prototype 1.6. Our app has massive memory leak on firefox after
> upgrade to 1.6.0. I have done a little bit analysis and find a way
> reproducing it consistently. I found once a Object having reference to
> DOM elements(directly or indirectly), and the object have been bind to
> some function using bind() or bindAsEventListener(), DOM elements
> referenced by the object will never get garbage collected. Here is a
> simple example
>
>       <div id='container'> massive data that occupying memory... <div>
>       <script type="text/javascript">
>         Foo = Class.create({
>           initialize: function(containerId){
>             this.container = $(containerId);
>           },
>
>           bar: function(){
>             var dummyBind = function(){}.bind(this);
>           }
>         });
>
>         new Foo('container').bar();
>       </script>
>
> Then you find memory get increased every-time you do a refresh. The
> amount of memory that increased is depending on how much data you put
> in the 'container' div.
>
> With my test data(2741 links in the container div), refresh this
> simple page for 100 times, make memory goes up to 183.59 mb. For
> prototype1.5, in the same condition browser only use 51.09 mb. I'm on
> Mac OSX tiger and my firefox version is 2.0.0.11
>
> I am pretty sure it is the DOM element not get collected. Because if I
> do a window unload hook to null out object's reference to the
> 'container' div, the memory get collected backs.
>
> I am trying to locate the problem in new prototype code, but haven't
> got any result yet. If anyone from prototype team could help me or
> give me some clues, it would be really appreciated. I will try to
> create a defect on trac and attach test page soon.
>
> Cheers
>
> WPC
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Prototype: Core" group.
To post to this group, send email to prototype-core@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/prototype-core?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to