I will most certainly have to look into this.
----- Original Message -----
From: "Eytan Heidingsfeld" <[EMAIL PROTECTED]>
To: "Dynapi-Dev" <[EMAIL PROTECTED]>
Sent: Monday, February 12, 2001 8:43 AM
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:
>
> ====================================
> <html>
> <head>
> <title>DynAPI Distribution: Destroy</title>
> <script language="Javascript" src="../src/dynapi.js"></script>
> <script language="Javascript">
> DynAPI.setLibraryPath('../src/lib/');
> DynAPI.include('dynapi.api.*');
> </script>
> <script language="Javascript">
> var mLayer;
> var a = [];
> function dowork(){
> for(var i=0;i<101;i++){
> a[i] = null;
> }
> document.body.removeChild(mLayer.elm);
>
> }
> DynAPI.onLoad = function() {
> mLayer = new DynLayer();
> mLayer.setHTML("testing memory free in IE");
> DynAPI.document.addChild(mLayer);
> window.status = "ready for action";
> for(var i=0;i<521;i++){
> a[i] = new DynLayer();
> mLayer.addChild(a[i]);
> }
> }
>
> </script>
> </head>
>
> <body bgcolor="#ffffff">
> <a href=javascript:dowork()>Start The Test</a>
> </body>
> </html>
> ======================================
>
>
> _______________________________________________
> Dynapi-Dev mailing list
> [EMAIL PROTECTED]
> http://lists.sourceforge.net/lists/listinfo/dynapi-dev
---
Outgoing mail is certified Virus Free by AVG Free Edition
http://www.grisoft.com/html/us_index.cfm
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.230 / Virus Database: 111 - Release Date: 1/25/01
_______________________________________________
Dynapi-Dev mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/dynapi-dev