I have discovered a memory leak in CFSCRIPT this afternoon, but couldn't
find any information about it in Allaire's Knowledge Base. Does anyone
know anything about it?
Basically, when using CFSCRIPT to build a large string, the memory goes
through the rough, especially virtual memory. The following code will
basically crash a server/workstation with 256megs of RAM (at least in
our tests) as it pushes VM as far as 700+ megs:
<cfscript>
tempStr = "";
for (x=1; x LTE 5000; x = x + 1)
{
tempStr = tempStr &
"xxxxxxxxx/xxxxxxxxx/xxxxxxxxx/xxxxxxxxx/xxxxxxxxx/";
}
</cfscript>
however, written in CFML, not only is the memory usage hardly anything,
the execution is faster and there is no leak. We've tried to reset the
variable to empty string with no change.
Any thoughts?
-mike
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at
http://www.fusionauthority.com/bkinfo.cfm
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists