WebFX WebBoard
Message Thread:
View All Messages
Back to WebFX
 JScript Garbage Collector, MoMad, October 23, 2003
     Re:JScript Garbage Collector, Adam Platti, October 24, 2003
         Re:JScript Garbage Collector, Tim Scarfe, October 24, 2003

Subject: Re:JScript Garbage Collector From: Tim Scarfe Date: October 24, 2003

You should rarely need to call the garbage collector, and it is a waste of time calling it if you still have external COM references in your script. JScript can't collect these references.

JScript uses a non generational mark and sweep collector which collects on page load as I recall.

From: Adam Platti
Sent: October 24, 2003
Subject: Re:JScript Garbage Collector

The garbage collector is invoked with a call to CollectGarbage().

Here's the page: http://support.microsoft.com/default.aspx?scid=kb;EN-US;q266088

Adam

 


 

From: MoMad
Sent: October 23, 2003
Subject: Re:JScript Garbage Collector

Alright, I know ive seen in this site or some other site somewhere that there is a hidden javascript function that forces the garbage collector to collect.  I am bringing this up because I wrote an application that loads an xml file that gets parsed by a xslt stylesheet to produce a tabpane... and then using Eric's tabpane.js it makes it look like one.  Now that is all good, but the problem is, my script is using XMLHTTP to download the data every 15 seconds, and update the data without ever leavig the page.

I found a problem in IE where if you just keep putting stuff into a DIV using:

var oDiv = document.getElementById("Sample_DIV");
if (oDiv) oDiv.innerHTML = strXML;

it will crash the browser, bringing up Dr. Watson.... i dont know why... it had something to do with form objects and unloading them.  But i seem to have fixed the problem by erasing the innerHTML first, like: oDiv.innerHTML = ""; oDiv.innerHTML = strXML;

Now, the innerHTML problem might be completely unrelated to the tabpane problem, but i use innerHTML to insert a DIV into the page, and that div gets processed by the tabpane code.  Anyways, if anyone has any input or anythign that can help.  The data is being refreshed constantly and the window is kept open for days and days... after about 2 or so hours, interent explorer eats up all available ram and crashes!!  So I really need help on this.

Thanks,

MoMad






Reply
Name: 
Email: 
Subject: 

Enter your reply to this message below. HTML tags are not supported but words that start with http://, ftp:// or mailto: are converted to links.


View All Messages
Back to WebFX