I am doing a test where I create a workbook, then add two spreadsheets on it and 500,000 rows with one test value in the first cell. Every object is initialised with the using keyword.
Memory consumption shoots up to 1GB and stays there, even after I have saved the workbook and exited the using bracket (but not the application).
I have profiled the app using ANTS. It looks as if the bulk of the memory is held in Generation 2 and consists of XLAddress, XLRow, XLCell and string objects (these must be the values)
I am not sure if this is standard behaviour? Ideally I would like ClosedXML to release those resources when it's finished because the service on which I am using it runs many such reports.
Is there any way of marshalling back that memory, other than using GC.Collect() ?
Memory consumption shoots up to 1GB and stays there, even after I have saved the workbook and exited the using bracket (but not the application).
I have profiled the app using ANTS. It looks as if the bulk of the memory is held in Generation 2 and consists of XLAddress, XLRow, XLCell and string objects (these must be the values)
I am not sure if this is standard behaviour? Ideally I would like ClosedXML to release those resources when it's finished because the service on which I am using it runs many such reports.
Is there any way of marshalling back that memory, other than using GC.Collect() ?