From: Doug M. <do...@cr...> - 2003-04-07 03:00:26
|
How did we recycle in NS 4? While the memory leak was never completly fixed in NS 4, we did manage to minimize it somewhat.. Keep in mind that the content of a layer in NS 4 is also retained in memory. Simply calling setHTML() repeatedly on a layer in NS 4 will cause a memory leak. I never did find a solution for this. The best I was able to do was reduce the amount of content that was being set each time. > See below: > > --- Kevin <ke...@ke...> wrote: > > Hello, > > > > If elements are removed and then some more are added > > we may have a memory leak. Using Mozilla and > > example: > > dynapi.api.dynlayer-destroy.html > > the elements aren't removed when the Destroy all > > link is > > clicked. > > > > Suggested fix > > dynlayer_base.js:p._remove > > > > -this.elm.innerHTML = ""; > > -this.elm.outerHTML = ""; > > +//this.elm.innerHTML = ""; > > +//this.elm.outerHTML = ""; > > +var p=this.parent.elm; > > +if(p) p.removeChild(this.elm); > > > > This seems to work fine in IE too.. > > I've added the above as well. > > > NS4 has a recycled array in > > dynlayer_ns4.js:p._remove > > but I don't see the space reused. Do we have growing > > memory here and perhaps the Layer should be deleted > > rather than hidden? > > Well, IMO if they're stored inside a recycle array > then they should be reused. Any ideas on how we should > do this? > > -- > Raymond Irving > > > - > > Kevin. > > > > > > > > > ------------------------------------------------------- > > This SF.net email is sponsored by: ValueWeb: > > Dedicated Hosting for just $79/mo with 500 GB of > > bandwidth! > > No other company gives more support or power for > > your dedicated server > > > http://click.atdmt.com/AFF/go/sdnxxaff00300020aff/direct/01/ > > _______________________________________________ > > Dynapi-Dev mailing list > > Dyn...@li... > > > http://www.mail-archive.com/dyn...@li.../ > > > __________________________________________________ > Do you Yahoo!? > Yahoo! Tax Center - File online, calculators, forms, and more > http://tax.yahoo.com > > > ------------------------------------------------------- > This SF.net email is sponsored by: ValueWeb: > Dedicated Hosting for just $79/mo with 500 GB of bandwidth! > No other company gives more support or power for your dedicated server > http://click.atdmt.com/AFF/go/sdnxxaff00300020aff/direct/01/ > _______________________________________________ > Dynapi-Dev mailing list > Dyn...@li... > http://www.mail-archive.com/dyn...@li.../ > --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.463 / Virus Database: 262 - Release Date: 3/17/2003 |