I would think that those references would be garbage collected at the next GC run, so no need to do that.
-- Josh -----Original Message----- From: Che Vilnonis [mailto:ch...@asitv.com] Sent: Tuesday, September 08, 2009 12:15 PM To: cf-talk Subject: onSessionEnd & clearing session scoped variables What is the best/proper way (using CF8) to clear all session variables in the onSessionEnd method of Application.cfc? Should I clear the variables individually? Should I clear the entire session scope? Or, since I have a default session timeout, do I need any of this code at all? See below. <cffunction name="onSessionEnd" returnType="void" output="false"> <cfargument name="sessionScope" type="struct" required="true"> <cfargument name="appScope" type="struct" required="false"> <cfset structClear(arguments.sessionScope)> </cffunction> <cffunction name="onSessionEnd" returnType="void" output="false"> <cfargument name="sessionScope" type="struct" required="true"> <cfargument name="appScope" type="struct" required="false"> <cfset structClear(arguments.sessionScope.cart)> <cfset structClear(arguments.sessionScope.cartcount)> <cfset structClear(arguments.sessionScope.recentlyviewed)> </cffunction> Thanks, Che ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:326104 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4