From: Bart B. <ba...@ho...> - 2001-02-12 22:33:16
|
So how would you implement this.... would you do a scripted "fake" resize onunload? Have you tested if this memory "bug" is generic... i.e. does it apply to = other pages also, not only DynAPI ones? -----Ursprungligt meddelande----- Fr=E5n: Michael Ellis <Mic...@il...> Till: 'dyn...@li...' = <dyn...@li...> Datum: den 12 februari 2001 21:48 =C4mne: RE: [Dynapi-Dev] Freeing Memory in IE >I can confirm this behavior on IE 4.x and NN 4.x. We also noted where = the IE >leak was about 1 - 2Meg, the NN leak was only 20 - 40K. Our application = has >2 nested layers containing a scrollpane, containing tables. We tried >deleting, removing, and setting various objects/elements =3D null but = nothing >would get the memory to budge. When we dropped the number of layers = down to >even one, the same behavior occured. This leak is a major problem for = us at >this time, any help would be greatly appreciated. > >Mike Ellis > >-----Original Message----- >From: Eytan Heidingsfeld [mailto:ey...@tr...] >Sent: Monday, February 12, 2001 09:44 >To: Dynapi-Dev >Subject: [Dynapi-Dev] Freeing Memory in IE > > >I have recently found very interesting behavior in IE 5. I used = proprietary >code so I don't know about IE4 and NN4 but I will check soon. I used = code to >create many DynLayers (520) inside another dynlayer(myLayer). Then I = called >document.body.removeChild(myLayer) the memory didn't budge. Then I = minimized >and maximized the browser. Walla! from 13MB to 1MB. (This with the Loop = to >nullify the DynLayers for they are still there taking up memory). >Here is the code to test: > >=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D ><html> ><head> ><title>DynAPI Distribution: Destroy</title> ><script language=3D"Javascript" src=3D"../src/dynapi.js"></script> ><script language=3D"Javascript"> >DynAPI.setLibraryPath('../src/lib/'); >DynAPI.include('dynapi.api.*'); ></script> ><script language=3D"Javascript"> >var mLayer; >var a =3D []; >function dowork(){ >for(var i=3D0;i<101;i++){ >a[i] =3D null; >} >document.body.removeChild(mLayer.elm); > >} >DynAPI.onLoad =3D function() { > mLayer =3D new DynLayer(); > mLayer.setHTML("testing memory free in IE"); > DynAPI.document.addChild(mLayer); > window.status =3D "ready for action"; >for(var i=3D0;i<521;i++){ >a[i] =3D new DynLayer(); >mLayer.addChild(a[i]); >} >} > ></script> ></head> > ><body bgcolor=3D"#ffffff"> ><a href=3Djavascript:dowork()>Start The Test</a> ></body> ></html> >=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > > > >_______________________________________________ >Dynapi-Dev mailing list >Dyn...@li... >http://lists.sourceforge.net/lists/listinfo/dynapi-dev > |