java - How can I free memory held by an XSSFWorkbook? -
java - How can I free memory held by an XSSFWorkbook? -
i have written java code takes info 3 spreadsheets , generates big spreadsheet ( 10 columns, 26,950 rows ) on machine 4gb memory. crashing generating spreadsheet (out of memory), rewriting code read big spreadsheet in chunks of 100 lines @ time, i've managed point writing output file hits out of memory error.
so i'm thinking if can free memory held 3 xssf workbooks, might give me plenty memory finish writing of output file- there doesn't appear close() instruction.
i've tried setting workbooks null, i'm not convinced freed memory.
does know 'proper' way close xssf workbook , reclaim memory takes up?
i'm running java 1.8.0_25.
try using sxssfworkbook instead of xssfworkbook. designed flush rows disk instead of holding them in memory.
java excel xssf
Comments
Post a Comment