Reading a file many times using "using(var ~)" causes a memory leak.
See original GitHub issueRead and complete the full issue template
Do you want to request a feature or report a bug?
- Bug
- Feature
If you are logging a possible bug or feature request, please test with the latest development build first.
Version of ClosedXML
e.g. 0.94.2
What is the current behavior?
Opening a file many times causes a memory leak and an exception occurs. Exception “OutOfMemoryException.” occurs.
What is the expected behavior or new feature?
Complete this.
Did this work in previous versions of our tool? Which versions?
Not checked.
Reproducibility
This is an important section. Read it carefully. Failure to do so will cause a ‘RTFM’ comment.
Without a code sample, it is unlikely that your issue will get attention. Don’t be lazy. Do the effort and assist the developers to reproduce your problem. Code samples should be minimal complete and verifiable. Sample spreadsheets should be attached whenever applicable. Remove sensitive information.
Code to reproduce problem:
public void Main()
{
// test.xlsx is in styled cells and 20,000 Records.
// Filesize in about 30MBytes.
using (var workbook = new XLWorkbook("test.xlsx"))
{
// not process
}
using (var workbook = new XLWorkbook("test.xlsx"))
{
// not process
}
using (var workbook = new XLWorkbook("test.xlsx"))
{
// not process
}
// Repeat this
}
- I attached a sample spreadsheet. (You can drag files on to this issue)
Issue Analytics
- State:
- Created 4 years ago
- Comments:5 (2 by maintainers)
Top GitHub Comments
@ShinoharaTa please check the binaries from there https://ci.appveyor.com/project/ClosedXML/closedxml/builds/26882694/job/3jqmmvo30ls7o50j/artifacts
Does it solve your issue?
Looks good. Right now, I checked result OK. Thank you for your support. I am grateful to you.