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.

FillStyle.Color memory leak

Thread ID:

Created:

Updated:

Platform:

Replies:

92469 Jan 17,2010 09:28 PM Jan 18,2010 02:16 AM Windows Forms 1
loading
Tags: Diagram
kim hyun su
Asked On January 17, 2010 09:28 PM

I am testing with SimpleFlow_2008 project (WinForm.Diagram Sample)

I just changed color of node using timer. but vm is increased continually. I tested for 8 hour.
I want to check why this problem is happened.

follow content is part of sample code. and attached all of sample code.

Please check my problem. Thank you.

private void timer1_Tick(object sender, EventArgs e)
{
Ellipse ellipse1 = m_Ellipse1 as Ellipse;
Ellipse ellipse2 = m_Ellipse2 as Ellipse;
Syncfusion.Windows.Forms.Diagram.Rectangle rectangle = m_Rectangle as Syncfusion.Windows.Forms.Diagram.Rectangle;
Polygon polygon = m_Polygon as Polygon;

if (m_fCurrent1 == false)
{
ellipse1.FillStyle.Color = Color.Blue;
m_fCurrent1 = true;
}
else
{
ellipse1.FillStyle.Color = Color.Red;
m_fCurrent1 = false;
}

if (m_fCurrent2 == false)
{
ellipse2.FillStyle.Color = Color.Blue;
m_fCurrent2 = true;
}
else
{
ellipse2.FillStyle.Color = Color.Red;
m_fCurrent2 = false;
}

if (m_fCurrent3 == false)
{
rectangle.FillStyle.Color = Color.Blue;
m_fCurrent3 = true;
}
else
{
rectangle.FillStyle.Color = Color.Red;
m_fCurrent3 = false;
}

if (m_fCurrent4 == false)
{
polygon.FillStyle.Color = Color.Blue;
m_fCurrent4 = true;
}
else
{
polygon.FillStyle.Color = Color.Red;
m_fCurrent4 = false;
}
}




CS_3fac4b4a.zip

Dinesh M [Syncfusion]
Replied On January 18, 2010 02:16 AM

Hi Kim,

This increase in VM should be due to the fact that the HistoryManger of diagram records all the action done there by increasing the memory. Please try using the following code and let me know if it helps you.

private void timer1_Tick(object sender, EventArgs e)
{
diagram1.Model.HistoryManager.Stop();
//You code that does some action.
diagram1.Model.HistoryManager.Start();
}

Regards,
Dinesh

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.

;