Help: Force ColdFusion to release memory.
Need some help. Anyone out there know of a why to force ColdFusion to release memory back to the JVM?
The situtation is that I have a conversion script that creates a bunch of objects to pull data from one database to another. The memory keeps spiking after a 1000 or so inserts and i’ve tried everything to get to do garbage collection and release the memory back to the jvm.
Things i’ve tried
Invoking garbage collection with java.lang.system
<cfset loc.sys = createobject(“java”, “java.lang.System”)>
setting the objects to javacast(“null”, “”)
Invoking garbage collection with java.lang.runtime
<cfset loc.sys = createobject(“java”, “java.lang.runtime”).getruntime()>
I’ve even tried using java.lang.ref.SoftReference
Plus a combination of all the above!!!!
Nothing I seem to do want to make the jvm run the garbage collection and release the memory.
If anyone has an itelligent suggestion, leave it here. I’m at my whits end!!!
BTW please don’t say to use queries or split up the job. That’s not an answer I’m even looking for.