We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.

ExcelRW memory Leak

Thread ID:

Created:

Updated:

Platform:

Replies:

30302 Jun 15,2005 10:15 AM May 13,2008 06:52 AM Windows Forms 7
loading
Tags: XlsIO
Administrator [Syncfusion]
Asked On June 15, 2005 10:15 AM

Each time i run this code, the memory grows and is NEVER reclaimed: Any idea ? Is ther a memory leak on ExcelRW ? ExcelEngine excelEngine = new ExcelEngine(); IApplication application = excelEngine.Excel; IWorkbook myWorkBook = excelEngine.Excel.Workbooks.Add(); IWorksheet sheet = myWorkBook.Worksheets[0]; for (int i = 0;i<=grid.RowCount;i++) { sheet.Range[i+1,1].RowHeight = (grid.RowHeights[i]/1.33); for(int j=0; j<=grid.ColCount;j++) { if(grid[i,j].HasBaseStyle) { sheet.Range[i+1,j+1].CellStyleName = grid[i,j].BaseStyle.ToString(); } sheet.Range[1,j+1].ColumnWidth = (grid.ColWidths[j]/7.43); sheet.Range[i+1,j+1].Value2 =grid[i,j].Text ; } }

Administrator [Syncfusion]
Replied On June 20, 2005 07:37 AM

WHY NO ONE ANSWERS MY QUESTION ? >Each time i run this code, the memory grows and is NEVER reclaimed: >Any idea ? Is ther a memory leak on ExcelRW ? > >ExcelEngine excelEngine = new ExcelEngine(); >IApplication application = excelEngine.Excel; >IWorkbook myWorkBook = excelEngine.Excel.Workbooks.Add(); >IWorksheet sheet = myWorkBook.Worksheets[0]; > > > for (int i = 0;i<=grid.RowCount;i++) > { > > sheet.Range[i+1,1].RowHeight = (grid.RowHeights[i]/1.33); > > for(int j=0; j<=grid.ColCount;j++) > { > if(grid[i,j].HasBaseStyle) > { > sheet.Range[i+1,j+1].CellStyleName = grid[i,j].BaseStyle.ToString(); > } > > sheet.Range[1,j+1].ColumnWidth = (grid.ColWidths[j]/7.43); > sheet.Range[i+1,j+1].Value2 =grid[i,j].Text ; > } > }

Erik Larson
Replied On June 20, 2005 10:07 AM

I am having the exact same problem. Let me know if you figure out what is going on.

Administrator [Syncfusion]
Replied On July 21, 2005 12:11 PM

I think the problem is that you need to invoke Close on the workbook (of course, ideally in a finnaly block). My tests have shown the same issue, until I added a call to Close on the worksheet. It''s not at all clear to me why Syncfusion did not implement Dispose on the Worbook. Mind you that my tests have shown that the solution above (i.e. call Close when done with the workbook) only solves the issue when you are not creating new worksheets. Any new worksheets added to the workbook will cause the memory to grow and will not be reclaimed, even after you call Close on the workbook.

Administrator [Syncfusion]
Replied On July 21, 2005 03:00 PM

Hi, Currently we are investigating into these Memory usage issues and will have a resolution soon. Please bear with use till then. Thanks, Stephen. >I think the problem is that you need to invoke Close on the workbook (of course, ideally in a finnaly block). My tests have shown the same issue, until I added a call to Close on the worksheet. It''s not at all clear to me why Syncfusion did not implement Dispose on the Worbook. >Mind you that my tests have shown that the solution above (i.e. call Close when done with the workbook) only solves the issue when you are not creating new worksheets. Any new worksheets added to the workbook will cause the memory to grow and will not be reclaimed, even after you call Close on the workbook.

Administrator [Syncfusion]
Replied On May 9, 2008 07:05 AM

Did anything ever come of this?

I'm seeing very high memory usage (followed by OOM crash) when exporting a 7000 line table.

Are there improvements in a later syncfusion release (currently using 3.0.1.0 with .Net 1.1)?


Administrator [Syncfusion]
Replied On May 9, 2008 07:06 AM

From windbg:

0x0ce87f60 96,697 7,735,760 Syncfusion.ExcelRW.Implementation.RangeImpl
0x10166894 182,075 11,169,900 Syncfusion.Styles.StyleInfoObjectStore/ObjectEntry[]
0x79ba2f5c 619,566 14,869,584 System.Collections.ArrayList
0x0ce8e7bc 576,561 16,143,708 Syncfusion.ExcelRW.Implementation.ValueChangedEventHandler
0x0ce947ac 1,017,475 16,279,600 Syncfusion.ExcelRW.Implementation.ExtendedFormatImplWrapper
0x10166220 1,045,570 18,572,668 System.Collections.Specialized.BitVector32[]
0x0ce9a1ac 460,392 25,781,952 Syncfusion.ExcelRW.Implementation.StyleImpl
0x0ce84ff4 460,392 29,465,088 Syncfusion.ExcelRW.Implementation.Collections.BordersCollection
0x00e62970 50,235 32,226,792 System.Collections.Hashtable/bucket[]
0x0ce93d5c 920,791 36,831,640 Syncfusion.ExcelRW.Implementation.ExtendedFormatImpl
0x0014e410 911 40,079,868 Free
0x0ce95294 1,580,750 44,261,000 Syncfusion.ExcelRW.Implementation.FontImplWrapper
0x00e6209c 748,363 62,477,424 System.Object[]
0x1c8b6a94 920,792 62,613,856 Syncfusion.ExcelRW.Parser.Biff_Records.ExtendedFormatRecord
0x0ce94dac 1,473,521 64,834,924 Syncfusion.ExcelRW.Implementation.FontImpl
0x79b946b0 1,634,332 77,836,800 System.String
0x1c8b7b64 1,473,522 82,517,232 Syncfusion.ExcelRW.Parser.Biff_Records.FontRecord
0x0ce8fce0 2,762,352 88,395,264 Syncfusion.ExcelRW.Implementation.BorderImpl


Yavanaarasi G [Syncfusion]
Replied On May 13, 2008 06:52 AM

Hi Paul,

Yes. We have improve the performance in our latest version. We recommend you to upgrade our latest public release of Essential Studio 2008 Volume 2.

You can download the latest version from the below forum thread:
http://www.syncfusion.com/support/Forums/message.aspx?&MessageID=72983

Unlock key:
If your Essential Studio license is current, you will be able to obtain the key to install this version from your account in DirectTrac. Otherwise, please contact your Syncfusion Sales Representative or e-mail salessupport@syncfusion.com.

Please let me know if you have any other concerns.

Regards,
G.Yavana



CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;