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. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Memory leaks with GridCurrencyTextBox

Thread ID:





72237 Mar 10,2008 05:17 PM UTC Mar 26,2008 12:30 PM UTC WinForms 3
Tags: GridControl
Tom Hart
Asked On March 10, 2008 05:17 PM UTC

Using version, VS.NET 2005

I have a grid with a currency column. If a cell in this column gets focus, the grid does not get garbage collected when I dispose the grid.

Memory profiling shows that a CultureChangedEventHandler is not being disposed and it is holding a reference to a GridCurrencyTextBox (which holds a reference to a GridCurrencyTextBoxCellRender, which holds a refrence to the grid).

Any workarounds for this?

Administrator [Syncfusion]
Replied On March 17, 2008 12:18 PM UTC

Hi Tom,

Sorry for the delay in responding.

Memory leaks with GridcurrencyTextBox:

It is difficult to identify the problem without a working sample. Could you please try to send your sample so that we could sort out the cause of the issue and provide you a solution?


Replied On March 25, 2008 08:57 PM UTC

Create a new form in Visual Studio Designer and place a syncfusion griddataboundgrid on it. Add the code listed below to create a currency column. In your program open the form and close it. Every time I open and close the form (and dispose) I get a grid remaining in memory. I verify this by running the garbage collector twice and then setting a breakpoint and using sos.

public partial class Form1 : Form
DataTable dt;

public Form1 ()
InitializeComponent ();

private void Form1_Load (object sender, EventArgs e)
dt = new DataTable ("TestTable");
dt.Columns.Add (new DataColumn ("MoneyColumn", typeof (System.Decimal)));
DataRow row = dt.NewRow ();
dt.Rows.Add (row);
row[0] = 5.5;
GridBoundColumn gridBoundColumn = new GridBoundColumn ();
gridBoundColumn.HeaderText = "Money";
gridBoundColumn.StyleInfo.CellType = "Currency";
gridBoundColumn.MappingName = "MoneyColumn";
gridDataBoundGrid1.GridBoundColumns.Add (gridBoundColumn);
gridDataBoundGrid1.DataSource = dt.DefaultView;

Partial output form SOS:

Administrator [Syncfusion]
Replied On March 26, 2008 12:30 PM UTC

Hi Tom,

Thank you for your update.

Memory leaks with GridCurrencyTextBox:

I am not able to reproduce the issue that you mentioned here. I have tested this issue with your code snippet and in the following environment windowsxp with service pack2,VS2005, .Net framework2.0, V6.1.0.34.But the issue not reproduced. Please refer the video clip:


Kindly give us more details regarding this issue and also provide your system details so that we could provide you a better solution.



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.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon 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.Close Icon