I am trying your freeSpire.XLS to convert excel chart to image .
The code I am using is this :
- Code: Select all
Spire.Xls.Workbook workbook_spire = new();
//Loading Excel file
workbook_spire.LoadFromFile(Path.Combine(mypath, "Out" + index + "_" + fileName));
workbook_spire.Charts[0].SaveToImage(myOutfilePath);
workbook_spire.Charts[0].Dispose();
workbook_spire.Dispose();
workbook_spire = null;
I assumed after disposing, my memory will be released. But it doesn't. I have used diagnostic tool in Visual Studio and it shows huge list of string and dictionary elements generated exactly after I call Spire.XLS and those are not released even after Dispose.
Memory consumption is as follows:
1. Heap size before calling spire --> arnd 10-12 MB
2. After spire --> arnd 95-100 MB
and this doesn't change after dispose (or very minor change)
Am I missing something?