Memory leaks with GridCurrencyTextBox

Using version 6.1.0.34, 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?


3 Replies

AD Administrator Syncfusion Team 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?

Regards,
G.Yavana




TO Tom 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:
DOMAIN(003D4348):HANDLE(Pinned):a13e0:Root:027f6de0(System.Object[])->
0184f9a4(Syncfusion.Windows.Forms.CultureChangedEventHandler)->
0184f894(System.Object[])->
0184e14c(Syncfusion.Windows.Forms.CultureChangedEventHandler)->
01846bcc(Syncfusion.Windows.Forms.Grid.GridCurrencyTextBox)->
01846b00(Syncfusion.Windows.Forms.Grid.GridCurrencyTextBoxCellRenderer)->
0183ecac(Syncfusion.Windows.Forms.Grid.GridDataBoundGrid)






AD Administrator Syncfusion Team 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:

http://websamples.syncfusion.com/samples/GridMemory.Zip

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

Regards,
G.Yavana



Loader.
Up arrow icon