Even though you can call the garbage collector, it's really only a
suggestion to Java to run the clean up than an explicit invocation of
the garbage collection. If I remember correctly, it has to do with
finalizing unreferenced objects and the algorithms Sun chose to run in
memory. Even if you're doing a lot of manipulations within a loop, you
shouldn't need to call java.lang.System.gc() as long as your properly
var your variables.
Aaron Rouse wrote:
What if you had an CFC instance that was doing a lot of data
manipulation within a loop? I have noticed in some pages here that do
just that, that the CF Service just keeps grabbing and grabbing
resources from the server until the entire page has completed running
or until the server runs out of resources. It seems like it should be
able to be forced to release the resources via triggering the GC
manually although that is not what I have observed. I do something
like this to trigger the GC:
objSystem = CreateObject( "java", "java.lang.System" );
objSystem.gc();
On 3/9/06, *Barry Beattie* <[EMAIL PROTECTED]
<mailto:[EMAIL PROTECTED]>> wrote:
1) why do you want to explicitly kill these CFC instances ? if they're
stored in a persistant scope (session, application, server**) I'd
understand, but if they're part of a request their references will be
destroyed when the page finishes loading and they'll be garbage
collected soon enough. trust in the Java GC
----------------------------------------------------------
You are subscribed to cfcdev. To unsubscribe, send an email to
[email protected] with the words 'unsubscribe cfcdev' as the subject
of the email.
CFCDev is run by CFCZone (www.cfczone.org) and supported by CFXHosting
(www.cfxhosting.com).
An archive of the CFCDev list is available at
www.mail-archive.com/[email protected]
--
Wayne Graham
Earl Gregg Swem Library
College of William and Mary
PO Box 8794
Williamsburg, VA 23185
757.221.3112
http://swem.wm.edu/blogs/waynegraham/
----------------------------------------------------------
You are subscribed to cfcdev. To unsubscribe, send an email to
[email protected] with the words 'unsubscribe cfcdev' as the subject of the
email.
CFCDev is run by CFCZone (www.cfczone.org) and supported by CFXHosting
(www.cfxhosting.com).
An archive of the CFCDev list is available at
www.mail-archive.com/[email protected]