Title:
Bug 85883:(Watson Migration Closure)Summary: possible memory leak with <cfmodule>See this thread on stackoverlow
| View in TrackerStatus/Resolution/Reason: Closed/Fixed/
Reporter/Name(from Bugbase): Adam Cameron / Adam Cameron (Adam Cameron)
Created: 01/18/2011
Components: Performance
Versions: 9.0.1
Failure Type: Unspecified
Found In Build/Fixed In Build: 0000 / 281914
Priority/Frequency: Normal / Unknown
Locale/System: English / Platforms All
Vote Count: 2
Problem:
Summary: possible memory leak with <cfmodule>See this thread on stackoverlow.com (http://stackoverflow.com/questions/4628060/memory-leak-looping-cfmodule-inside-cffunction). It appears that <cfmodule> does not release its memory when it has completed when called from a <cffunction>. I think this is an edge case, but it probably warrants a bit of an examination as to how <cfmodule> (and custom tag calls in general) deals with marking any memory it has had allocated as recoverable once it completes.This is not the first instance of problems with <cfmodule> and memory releasing I have come across.-- Adam
Method:
[details at the URL included in the description]
<cffunction name="fun" output="false" access="public" returntype="any" hint="">
<cfset var local = structNew()/>
<!--- comment out cfmodule and no OOM --->
<cfmodule template="template.cfm">
</cffunction>
<cfset size = 1000 * 200>
<cfloop from="1" to="#size#" index="idx">
<cfset fun()>
<cfif NOT idx mod 1000>
<cflog file="se-err" text="#idx# of #size#">
</cfif>
</cfloop>
Result:
----------------------------- Additional Watson Details -----------------------------
Watson Bug ID: 3043102
External Customer Info:
External Company:
External Customer Name: Adam Cameron
External Customer Email: 17EB1A7649DA54C7992015A9
External Test Config: 01/18/2011
Attachments:
Comments: