memory leak in C#?

  • Thread starter Thread starter bobo
  • Start date Start date
B

bobo

GraphicsPath p=new GraphicsPath();
//p.AddLine(p1,p2);
//p.Widen(pen);
p.Dispose();

this code runs ok.

but if I uncomment the two lines above. the program finally crashes out of
memory? can somebody tell me why?

thank you.
 
I don't get this behaviour.
My code runs fine:
GraphicsPath gPath = new GraphicsPath();
gPath.AddLine(10,10,100,100);
gPath.Widen(new Pen(Color.Red, 2));
gPath.Dispose();

Is there not something else that could be causing the app to crash?
What about the possibility of a infinite loop somewhere else?


Simon
 
Back
Top