Please be kind -- I am JAVA illerate.

I am creating workbooks using POI HSSF.  Here is a code snippet from a page:

<cfset myWorkBook = 
createObject("java","org.apache.poi.hssf.usermodel.HSSFWorkbook")>

 .... create and fill workbook sheets with data......
<cfscript>
 context = getPageContext();
 context.setFlushOutput(false);
 response = context.getResponse().getResponse();
 out = response.getOutputStream();
 response.setContentType("application/vnd.ms-excel");
 myWorkBook .write(out);
 out.flush();
 response.reset();
 out.close();
</cfscript>

I found the cfscript code out on the web but don't quite fully understand it 
all.

What I'm concerned about is releasing objects properly so they can be 
immediately collected by the JVM garbage collector.  I know that closing the 
"out" object will release it but should I also close the response and context 
objects?  And how do I release the myWorkBook object?  I don't want it hanging 
around if the user decides to go to lunch.

Any insight would be greatly appreciated!

Warren Koch

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;207172674;29440083;f

Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:316718
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4

Reply via email to