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 .
I added this code to timer1_Tick in AnimatedBasicApp.
GoBasicNode node = obj as GoBasicNode;
if (node != null)
{
node.Shape.BrushColor = GetRandomColor(100);
counter++;
}
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.)
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 .
Thanks
kamjoo