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.

Memory leaks with GridCurrencyTextBox

Thread ID:

Created:

Updated:

Platform:

Replies:

72237 Mar 10,2008 01:17 PM Mar 26,2008 08:30 AM Windows Forms 3
loading
Tags: GridControl
Tom Hart
Asked On March 10, 2008 01:17 PM

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?


Administrator [Syncfusion]
Replied On March 17, 2008 08:18 AM

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



Tom
Replied On March 25, 2008 04:57 PM

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)





Administrator [Syncfusion]
Replied On March 26, 2008 08:30 AM

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



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.

;