GoShape.BrushColor Memory Leakage

Hi ,

When I change GoShape.BrushColor with different colors very fast , It make memory leakage in my application and GC couldn’t manage it as form with GOShape object is open . When I change Page to other form , GC will remove extra memory .

It makes my Application unstable and after a few days if user is keeping one page , Application will crash .

Kamjoo Bayat

How are you doing the change?

HI ,
this is same code that I used

                            Color TmpBColor = Color.FromArgb(int.Parse(SplitedColor[2]),

                            this.BrushColor = TmpBColor;

I added this code to timer1_Tick in AnimatedBasicApp.

    GoBasicNode node = obj as GoBasicNode;
    if (node != null)
      node.Shape.BrushColor = GetRandomColor(100);
    GoText t = obj as GoText;
    if (t != null) t.Text = counter.ToString() + " in " + ((int)(DateTime.Now - starttime).TotalSeconds).ToString() + " seconds";

and these too:
private static int counter = 0;
public DateTime starttime = DateTime.Now;

Ran it for 20 minutes and 1.9 million setting of BrushColor. Memory didn’t move up. If you have a leak, it isn’t in BrushColor. (I had to stop after 20 minutes because the flashing was super annoying and giving me a headache.)

Maybe the GoUndoManager is collecting changes continuously?

Hi ,
GoUndoManager is Enabled in Application in development mode .I think it is enable also in Run-Time . I will make it disable and check again .

Hi ,

When I disable UnDoManager .It is stable now . Thank you so much .